[LTO] Always mark regular LTO units with EnableSplitLTOUnit=1
authorTeresa Johnson <tejohnson@google.com>
Fri, 19 Jul 2019 23:02:58 +0000 (23:02 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 19 Jul 2019 23:02:58 +0000 (23:02 +0000)
commit604f802fd30d60226fca7d808b7e513e7f80c603
tree181ca5c0a00f2db91b956229cf322fe8403fa8af
parent578e8fa8337dd203f4c450bc7100bb40652ca429
[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
clang/lib/CodeGen/BackendUtil.cpp
clang/test/CodeGen/split-lto-unit.c [new file with mode: 0644]