diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-05-23 01:12:26 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-05-23 01:12:26 +0000 |
commit | bd881834c5eeb75f1e5cd8a0d56c25dfe122daa5 (patch) | |
tree | d137183a4ce14e9fbdc74e7d7da83c584b92709a /llvm/tools/opt/opt.cpp | |
parent | 20e9bcbfc8817eb9a4c2433830a571430b7321e8 (diff) | |
download | bcm5719-llvm-bd881834c5eeb75f1e5cd8a0d56c25dfe122daa5.tar.gz bcm5719-llvm-bd881834c5eeb75f1e5cd8a0d56c25dfe122daa5.zip |
Simplify and rename function overrideFunctionAttributes. NFC.
This is in preparation to making changes needed to stop resetting
NoFramePointerElim in resetTargetOptions.
llvm-svn: 238079
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 2aa84a8c8a8..15b24cf5072 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -386,6 +386,7 @@ int main(int argc, char **argv) { Triple ModuleTriple(M->getTargetTriple()); std::string CPUStr, FeaturesStr; TargetMachine *Machine = nullptr; + if (ModuleTriple.getArch()) { CPUStr = getCPUStr(); FeaturesStr = getFeaturesStr(); @@ -394,8 +395,8 @@ int main(int argc, char **argv) { std::unique_ptr<TargetMachine> TM(Machine); - // Override function attributes. - overrideFunctionAttributes(CPUStr, FeaturesStr, *M); + // Override function attributes based on CPUStr and FeaturesStr. + setFunctionAttributes(CPUStr, FeaturesStr, *M); // If the output is set to be emitted to standard out, and standard out is a // console, print out a warning message and refuse to do it. We don't |