]> granicus.if.org Git - clang/commit
Resubmit "Pass down the -flto option to the -cc1 job" (r239481)
authorTeresa Johnson <tejohnson@google.com>
Mon, 6 Jul 2015 16:23:00 +0000 (16:23 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 6 Jul 2015 16:23:00 +0000 (16:23 +0000)
commit0cef88b2d8b9676bfa153f112275ec570498dc9e
treeb9d87fd822d05812aacab6549bd110b28f2eebba
parent7f4982a8e2822559b5073e59ee4c356b4a6bfdd5
Resubmit "Pass down the -flto option to the -cc1 job" (r239481)

The patch is the same except for the addition of a new test for the
issue that required reverting the dependent llvm commit.

--Original Commit Message--

Pass down the -flto option to the -cc1 job, and from there into the
CodeGenOptions and onto the PassManagerBuilder. This enables gating
the new EliminateAvailableExternally module pass on whether we are
preparing for LTO.

If we are preparing for LTO (e.g. a -flto -c compile), the new pass is not
included as we want to preserve available externally functions for possible
link time inlining.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241467 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/available-externally-hidden.cpp [new file with mode: 0644]
test/CodeGen/available-externally-suppress.c