diff options
author | Eric Christopher <echristo@gmail.com> | 2015-08-27 20:05:48 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-08-27 20:05:48 +0000 |
commit | 3751bce2a9be5e6c98a13e3a977f91888c83c226 (patch) | |
tree | 312ac5bb18b1bbd6cf09526d38ee1a274ebfcd6b | |
parent | 5d2db529cbbc269e4d6460fd059c07838266dad8 (diff) | |
download | bcm5719-llvm-3751bce2a9be5e6c98a13e3a977f91888c83c226.tar.gz bcm5719-llvm-3751bce2a9be5e6c98a13e3a977f91888c83c226.zip |
Target attribute syntax compatibility fix - gcc uses no- rather than mno-.
llvm-svn: 246197
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGen/attr-target-ppc.c | 2 | ||||
-rw-r--r-- | clang/test/CodeGen/attr-target-x86.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index eff9fde8393..4cb9ebae3af 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1528,7 +1528,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, // overall feature validity for the function with the rest of the // attributes on the function. ; - else if (Feature.startswith("mno-")) + else if (Feature.startswith("no-")) FnFeatures.push_back("-" + Feature.split("-").second.str()); else FnFeatures.push_back("+" + Feature.str()); diff --git a/clang/test/CodeGen/attr-target-ppc.c b/clang/test/CodeGen/attr-target-ppc.c index c98c70a646f..d2901748b37 100644 --- a/clang/test/CodeGen/attr-target-ppc.c +++ b/clang/test/CodeGen/attr-target-ppc.c @@ -1,4 +1,4 @@ // RUN: not %clang_cc1 -triple powerpc64le-linux-gnu -emit-llvm %s -o - -long __attribute__((target("power8-vector,mno-vsx"))) foo (void) { return 0; } // expected-error {{option '-mpower8-vector' cannot be specified with '-mno-vsx'}} +long __attribute__((target("power8-vector,no-vsx"))) foo (void) { return 0; } // expected-error {{option '-mpower8-vector' cannot be specified with '-mno-vsx'}} diff --git a/clang/test/CodeGen/attr-target-x86.c b/clang/test/CodeGen/attr-target-x86.c index b02dd719650..6f9a75e2d68 100644 --- a/clang/test/CodeGen/attr-target-x86.c +++ b/clang/test/CodeGen/attr-target-x86.c @@ -7,14 +7,14 @@ int __attribute__((target("avx,sse4.2,arch=ivybridge"))) foo(int a) { return 4; int __attribute__((target("tune=sandybridge"))) walrus(int a) { return 4; } int __attribute__((target("fpmath=387"))) koala(int a) { return 4; } -int __attribute__((target("mno-sse2"))) echidna(int a) { return 4; } +int __attribute__((target("no-sse2"))) echidna(int a) { return 4; } int __attribute__((target("sse4"))) panda(int a) { return 4; } int bar(int a) { return baz(a) + foo(a); } int __attribute__((target("avx, sse4.2, arch= ivybridge"))) qux(int a) { return 4; } -int __attribute__((target("mno-aes, arch=ivybridge"))) qax(int a) { return 4; } +int __attribute__((target("no-aes, arch=ivybridge"))) qax(int a) { return 4; } // Check that we emit the additional subtarget and cpu features for foo and not for baz or bar. // CHECK: baz{{.*}} #0 |