Author: Joseph Huber
Date: 2022-04-21T18:50:26-04:00
New Revision: 334899110639297d62618f2bb5f8da9c0c46698a

URL: 
https://github.com/llvm/llvm-project/commit/334899110639297d62618f2bb5f8da9c0c46698a
DIFF: 
https://github.com/llvm/llvm-project/commit/334899110639297d62618f2bb5f8da9c0c46698a.diff

LOG: [OpenMP] Properly guard linker input using the new driver

Summary:
A new offloading action builder line was added that wasn't guarded with
the new driver for OpenMP. This doesn't affect anything now but could
potentially cause problems.

Added: 
    

Modified: 
    clang/lib/Driver/Driver.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 0e0d2b47bd663..1c5fb22026e26 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -4027,7 +4027,8 @@ void Driver::BuildActions(Compilation &C, DerivedArgList 
&Args,
   if (LinkerInputs.empty()) {
     Arg *FinalPhaseArg;
     if (getFinalPhase(Args, &FinalPhaseArg) == phases::Link)
-      OffloadBuilder.appendDeviceLinkActions(Actions);
+      if (!UseNewOffloadingDriver)
+        OffloadBuilder.appendDeviceLinkActions(Actions);
   }
 
   if (!LinkerInputs.empty()) {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to