diff options
author | Paul Kirth <paulkirth@google.com> | 2023-12-18 13:03:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-18 13:03:13 -0800 |
commit | d1e2b96b606e5bf8329ab5821f7a614163a56e16 (patch) | |
tree | ee842c2225254e606c2fa4a40545d79a41c5227e /clang/lib/CodeGen/BackendUtil.cpp | |
parent | e409f85154fda5bd39436298741faa58178e6051 (diff) | |
download | llvm-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.cpp | 5 |
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)); |