aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2023-12-18 13:03:13 -0800
committerGitHub <noreply@github.com>2023-12-18 13:03:13 -0800
commitd1e2b96b606e5bf8329ab5821f7a614163a56e16 (patch)
treeee842c2225254e606c2fa4a40545d79a41c5227e /clang/lib/CodeGen/BackendUtil.cpp
parente409f85154fda5bd39436298741faa58178e6051 (diff)
downloadllvm-d1e2b96b606e5bf8329ab5821f7a614163a56e16.zip
llvm-d1e2b96b606e5bf8329ab5821f7a614163a56e16.tar.gz
llvm-d1e2b96b606e5bf8329ab5821f7a614163a56e16.tar.bz2
[clang][fatlto] Don't set ThinLTO module flag with FatLTO (#75079)
Since FatLTO now uses the UnifiedLTO pipeline, we should not set the ThinLTO module flag to true, since it may cause an assertion failure. See https://github.com/llvm/llvm-project/issues/70703 for context.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 7d16de3..480410d 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -1068,11 +1068,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
}
}
if (CodeGenOpts.FatLTO) {
- // Set module flags, like EnableSplitLTOUnit and UnifiedLTO, since FatLTO
+ // Set the EnableSplitLTOUnit and UnifiedLTO module flags, since FatLTO
// uses a different action than Backend_EmitBC or Backend_EmitLL.
- if (!TheModule->getModuleFlag("ThinLTO"))
- TheModule->addModuleFlag(llvm::Module::Error, "ThinLTO",
- uint32_t(CodeGenOpts.PrepareForThinLTO));
if (!TheModule->getModuleFlag("EnableSplitLTOUnit"))
TheModule->addModuleFlag(llvm::Module::Error, "EnableSplitLTOUnit",
uint32_t(CodeGenOpts.EnableSplitLTOUnit));