diff options
author | Teresa Johnson <tejohnson@google.com> | 2019-07-19 23:02:58 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2019-07-19 23:02:58 +0000 |
commit | 604f802fd30d60226fca7d808b7e513e7f80c603 (patch) | |
tree | 181ca5c0a00f2db91b956229cf322fe8403fa8af /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 578e8fa8337dd203f4c450bc7100bb40652ca429 (diff) | |
download | bcm5719-llvm-604f802fd30d60226fca7d808b7e513e7f80c603.tar.gz bcm5719-llvm-604f802fd30d60226fca7d808b7e513e7f80c603.zip |
[LTO] Always mark regular LTO units with EnableSplitLTOUnit=1
Summary:
Regular LTO modules do not need LTO Unit splitting, only ThinLTO does
(they must be consistently split into regular and Thin units for
optimizations such as whole program devirtualization and lower type
tests). In order to avoid spurious errors from LTO when combining with
split ThinLTO modules, always set this flag for regular LTO modules.
Reviewers: pcc
Subscribers: mehdi_amini, Prazek, inglorion, steven_wu, dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65009
llvm-svn: 366623
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 850b3db6213..b53d7a6ddfa 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -852,7 +852,7 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, if (!TheModule->getModuleFlag("ThinLTO")) TheModule->addModuleFlag(Module::Error, "ThinLTO", uint32_t(0)); TheModule->addModuleFlag(Module::Error, "EnableSplitLTOUnit", - CodeGenOpts.EnableSplitLTOUnit); + uint32_t(1)); } PerModulePasses.add(createBitcodeWriterPass( |