]> granicus.if.org Git - clang/commit
[clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs
authorLeonard Chan <leonardchan@google.com>
Thu, 20 Jun 2019 19:44:51 +0000 (19:44 +0000)
committerLeonard Chan <leonardchan@google.com>
Thu, 20 Jun 2019 19:44:51 +0000 (19:44 +0000)
commita24f44c96603aff88e235e5ea46285e84aeb85f5
treef492ab24f925be665b0b32fd13b38724bcb72091
parenta4c6100bf439d8eef07827955e356f4cfb5264af
[clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs

This fixes CodeGen/available-externally-suppress.c when the new pass manager is
turned on by default. available_externally was not emitted during -O2 -flto
runs when it should still be retained for link time inlining purposes. This can
be fixed by checking that we aren't LTOPrelinking when adding the
EliminateAvailableExternallyPass.

Differential Revision: https://reviews.llvm.org/D63580

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363971 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/available-externally-suppress.c