diff options
author | macurtis-amd <macurtis@amd.com> | 2024-08-05 10:06:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-05 10:06:51 -0500 |
commit | 13dd795ef108c75b1b6240832f77ca5282a2e629 (patch) | |
tree | 73517d5adce14eaef19fdc484565214d2c663cd1 /clang/lib/Driver/Driver.cpp | |
parent | 212950fbcec3b71fa15ee49e0539333a30159c32 (diff) | |
download | llvm-13dd795ef108c75b1b6240832f77ca5282a2e629.zip llvm-13dd795ef108c75b1b6240832f77ca5282a2e629.tar.gz llvm-13dd795ef108c75b1b6240832f77ca5282a2e629.tar.bz2 |
[clang][NFC] Make OffloadLTOMode getter a separate method (#101200)
Minor readability improvement (IMHO). Also makes it easier to find the
places where we are getting the offload lto mode.
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 8e44d5a..8a5f83e 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -3492,7 +3492,7 @@ class OffloadingActionBuilder final { // a fat binary containing all the code objects for different GPU's. // The fat binary is then an input to the host action. for (unsigned I = 0, E = GpuArchList.size(); I != E; ++I) { - if (C.getDriver().isUsingLTO(/*IsOffload=*/true)) { + if (C.getDriver().isUsingOffloadLTO()) { // When LTO is enabled, skip the backend and assemble phases and // use lld to link the bitcode. ActionList AL; @@ -4856,8 +4856,7 @@ Action *Driver::ConstructPhaseAction( Output = types::TY_LTO_BC; return C.MakeAction<BackendJobAction>(Input, Output); } - if (isUsingLTO(/* IsOffload */ true) && - TargetDeviceOffloadKind != Action::OFK_None) { + if (isUsingOffloadLTO() && TargetDeviceOffloadKind != Action::OFK_None) { types::ID Output = Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC; return C.MakeAction<BackendJobAction>(Input, Output); |