r246197 - Target attribute syntax compatibility fix - gcc uses no- rather than mno-.

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 13:05:48 PDT 2015


Author: echristo
Date: Thu Aug 27 15:05:48 2015
New Revision: 246197

URL: http://llvm.org/viewvc/llvm-project?rev=246197&view=rev
Log:
Target attribute syntax compatibility fix - gcc uses no- rather than mno-.

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp
    cfe/trunk/test/CodeGen/attr-target-ppc.c
    cfe/trunk/test/CodeGen/attr-target-x86.c

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=246197&r1=246196&r2=246197&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Aug 27 15:05:48 2015
@@ -1528,7 +1528,7 @@ void CodeGenModule::ConstructAttributeLi
           // 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());

Modified: cfe/trunk/test/CodeGen/attr-target-ppc.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-target-ppc.c?rev=246197&r1=246196&r2=246197&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-target-ppc.c (original)
+++ cfe/trunk/test/CodeGen/attr-target-ppc.c Thu Aug 27 15:05:48 2015
@@ -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'}}
 

Modified: cfe/trunk/test/CodeGen/attr-target-x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-target-x86.c?rev=246197&r1=246196&r2=246197&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-target-x86.c (original)
+++ cfe/trunk/test/CodeGen/attr-target-x86.c Thu Aug 27 15:05:48 2015
@@ -7,14 +7,14 @@ int __attribute__((target("avx,sse4.2,ar
 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




More information about the cfe-commits mailing list