[MachineOutliner] Properly pass -moutline along to the toolchain
authorJessica Paquette <jpaquette@apple.com>
Fri, 6 Jul 2018 22:24:56 +0000 (22:24 +0000)
committerJessica Paquette <jpaquette@apple.com>
Fri, 6 Jul 2018 22:24:56 +0000 (22:24 +0000)
commit33648c335e2e8dc1d6c2188c4d379cdc97233dd8
treebcdf3eefc6ddc11750629a9240b28953ffa2dfc5
parent10f20fc42b9fc3f45053af2d4a566ec84e773596
[MachineOutliner] Properly pass -moutline along to the toolchain

This moves the LTO-specific code for outlining from ToolChains/Clang.cpp to
ToolChains/Darwin.cpp. Passing -mllvm flags isn't sufficient for making sure
that the specified pass will actually run in LTO. This makes sure that when
-moutline is passed, the MachineOutliner will actually be added to the LTO
pass pipeline as expected.

llvm-svn: 336471
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/aarch64-outliner.c
clang/test/Driver/darwin-ld.c