Skip to content

Commit

Permalink
[Driver][NFC] Simplify code.
Browse files Browse the repository at this point in the history
Reviewed By: benshi001, jhuber6

Differential Revision: https://reviews.llvm.org/D148908
  • Loading branch information
jacquesguan committed Apr 23, 2023
1 parent d01641b commit 8e3a5a9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4095,16 +4095,15 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,

Current = NewCurrent;

// Use the current host action in any of the offloading actions, if
// required.
if (!UseNewOffloadingDriver)
if (OffloadBuilder->addHostDependenceToDeviceActions(Current, InputArg))
break;

// Try to build the offloading actions and add the result as a dependency
// to the host.
if (UseNewOffloadingDriver)
Current = BuildOffloadingActions(C, Args, I, Current);
// Use the current host action in any of the offloading actions, if
// required.
else if (OffloadBuilder->addHostDependenceToDeviceActions(Current,
InputArg))
break;

if (Current->getType() == types::TY_Nothing)
break;
Expand Down

0 comments on commit 8e3a5a9

Please sign in to comment.