Author: sfantao Date: Wed Oct 26 20:08:58 2016 New Revision: 285264 URL: http://llvm.org/viewvc/llvm-project?rev=285264&view=rev Log: Remove check for -o option in offloading actions builder.
This check is also present when jobs are built, so the offloading builder check is not needed anymore. Modified: cfe/trunk/lib/Driver/Driver.cpp cfe/trunk/test/Driver/cuda-output-asm.cu Modified: cfe/trunk/lib/Driver/Driver.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=285264&r1=285263&r2=285264&view=diff ============================================================================== --- cfe/trunk/lib/Driver/Driver.cpp (original) +++ cfe/trunk/lib/Driver/Driver.cpp Wed Oct 26 20:08:58 2016 @@ -1418,9 +1418,6 @@ class OffloadingActionBuilder final { /// The compilation that is using this builder. Compilation &C; - /// The derived arguments associated with this builder. - DerivedArgList &Args; - /// Map between an input argument and the offload kinds used to process it. std::map<const Arg *, unsigned> InputArgToOffloadKindMap; @@ -1760,7 +1757,7 @@ class OffloadingActionBuilder final { public: OffloadingActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) - : C(C), Args(Args) { + : C(C) { // Create a specialized builder for each device toolchain. IsValid = true; @@ -1876,31 +1873,17 @@ public: /// Add the offloading top level actions to the provided action list. bool appendTopLevelActions(ActionList &AL, Action *HostAction, const Arg *InputArg) { - auto NumActions = AL.size(); - for (auto *SB : SpecializedBuilders) { if (!SB->isValid()) continue; SB->appendTopLevelActions(AL); } - assert(NumActions <= AL.size() && "Expecting more actions, not less!"); - // Propagate to the current host action (if any) the offload information // associated with the current input. if (HostAction) HostAction->propagateHostOffloadInfo(InputArgToOffloadKindMap[InputArg], /*BoundArch=*/nullptr); - - // If any action is added by the builders, -o is ambiguous if we have more - // than one top-level action. - if (NumActions < AL.size() && Args.hasArg(options::OPT_o) && - AL.size() > 1) { - C.getDriver().Diag( - clang::diag::err_drv_output_argument_with_multiple_files); - return true; - } - return false; } Modified: cfe/trunk/test/Driver/cuda-output-asm.cu URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cuda-output-asm.cu?rev=285264&r1=285263&r2=285264&view=diff ============================================================================== --- cfe/trunk/test/Driver/cuda-output-asm.cu (original) +++ cfe/trunk/test/Driver/cuda-output-asm.cu Wed Oct 26 20:08:58 2016 @@ -29,3 +29,5 @@ // RUN: %clang -### -emit-llvm -c -target x86_64-linux-gnu -o foo.s %s 2>&1 \ // RUN: | FileCheck -check-prefix MULTIPLE-OUTPUT-FILES %s // MULTIPLE-OUTPUT-FILES: error: cannot specify -o when generating multiple output files +// Make sure we do not get duplicate diagnostics. +// MULTIPLE-OUTPUT-FILES-NOT: error: cannot specify -o when generating multiple output files _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits