diff options
author | Kyungwoo Lee <kyulee@meta.com> | 2024-10-03 09:58:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 09:58:01 -0700 |
commit | c1959813d6a650de7626ef9b7a7313369277f49e (patch) | |
tree | 1661effa6a855c8d55fb8f0a2e596ee0b9d97152 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | a72248cb65a74aff3cc5aef8d2807fc7efb4fb75 (diff) | |
download | llvm-c1959813d6a650de7626ef9b7a7313369277f49e.zip llvm-c1959813d6a650de7626ef9b7a7313369277f49e.tar.gz llvm-c1959813d6a650de7626ef9b7a7313369277f49e.tar.bz2 |
[CGData][ThinLTO][NFC] Prep for two-codegen rounds (#90934)
This is NFC for https://github.com/llvm/llvm-project/pull/90933.
- Create a lambda function, `RunBackends`, to group the backend
operations into a single function.
- Explicitly pass the `CodeGenOnly` argument to thinBackend, instead of
depending on a configuration value.
Depends on https://github.com/llvm/llvm-project/pull/90304.
This is a patch for
https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 62c6a57..abc936f 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -1321,10 +1321,10 @@ static void runThinLTOBackend( Conf.CGFileType = getCodeGenFileType(Action); break; } - if (Error E = - thinBackend(Conf, -1, AddStream, *M, *CombinedIndex, ImportList, - ModuleToDefinedGVSummaries[M->getModuleIdentifier()], - /* ModuleMap */ nullptr, CGOpts.CmdArgs)) { + if (Error E = thinBackend( + Conf, -1, AddStream, *M, *CombinedIndex, ImportList, + ModuleToDefinedGVSummaries[M->getModuleIdentifier()], + /* ModuleMap */ nullptr, Conf.CodeGenOnly, CGOpts.CmdArgs)) { handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) { errs() << "Error running ThinLTO backend: " << EIB.message() << '\n'; }); |