mirror of https://github.com/microsoft/clang.git
Target attribute syntax compatibility fix - gcc uses no- rather than mno-.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a30d1d4acd
commit
40b29f5a3f
|
@ -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());
|
||||
|
|
|
@ -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'}}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue