diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-05-06 23:54:14 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-05-06 23:54:14 +0000 |
commit | 3058d0f08026583f1db33a040eac0f8f654dff41 (patch) | |
tree | d9b0454cc98a1d3b808dc8b2e5740c3915daaef8 /llvm/tools/opt/opt.cpp | |
parent | 2e0d29fb09f7d559616bc756709630c14d31677e (diff) | |
download | bcm5719-llvm-3058d0f08026583f1db33a040eac0f8f654dff41.tar.gz bcm5719-llvm-3058d0f08026583f1db33a040eac0f8f654dff41.zip |
Let llc and opt override "-target-cpu" and "-target-features" via command line
options.
This commit fixes a bug in llc and opt where "-mcpu" and "-mattr" wouldn't
override function attributes "-target-cpu" and "-target-features" in the IR.
Differential Revision: http://reviews.llvm.org/D9537
llvm-svn: 236677
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 8f2b3f7a72b..2aa84a8c8a8 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -394,6 +394,9 @@ int main(int argc, char **argv) { std::unique_ptr<TargetMachine> TM(Machine); + // Override function attributes. + overrideFunctionAttributes(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 // impress anyone by spewing tons of binary goo to a terminal. |