]> granicus.if.org Git - clang/commitdiff
Target attribute syntax compatibility fix - gcc uses no- rather than mno-.
authorEric Christopher <echristo@gmail.com>
Thu, 27 Aug 2015 20:05:48 +0000 (20:05 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 27 Aug 2015 20:05:48 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246197 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp
test/CodeGen/attr-target-ppc.c
test/CodeGen/attr-target-x86.c

index eff9fde8393a86c00192d101ececbd085a10058c..4cb9ebae3af751201b03a4d6a6db0da5b48a3828 100644 (file)
@@ -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());
index c98c70a646f62ec0353ea4327e0b255c23844c37..d2901748b37cb95471b09e58ab7d10a9dddcf6ca 100644 (file)
@@ -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'}}
 
index b02dd7196508af3ff71374cf82135f788ffce2a4..6f9a75e2d68bfd69393bdab9844f085f7151fde0 100644 (file)
@@ -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