diff options
author | Eric Christopher <echristo@gmail.com> | 2015-06-12 01:35:58 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-06-12 01:35:58 +0000 |
commit | 4dfe075f93043843ee55f593d063c8c04411fbfc (patch) | |
tree | 382e5bf4ebb55c168af983f90171074f454343e2 /clang/lib/CodeGen | |
parent | 64a247b68bffc928ea34c638edfda7e4cd87517e (diff) | |
download | bcm5719-llvm-4dfe075f93043843ee55f593d063c8c04411fbfc.tar.gz bcm5719-llvm-4dfe075f93043843ee55f593d063c8c04411fbfc.zip |
Handle -mno-<feature> in target attribute strings by replacing the
-mno- with a -<feature> to match how we handle this in the rest
of the frontend.
llvm-svn: 239581
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 424997d125e..9be73406269 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1515,8 +1515,10 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, else if (Feature.startswith("tune=")) // We don't support cpu tuning this way currently. ; - else - Features.push_back("+" + Feature.str()); + else if (Feature.startswith("mno-")) + Features.push_back("-" + Feature.split("-").second.str()); + else + Features.push_back("+" + Feature.str()); } } } |