From: Eric Christopher Date: Thu, 27 Aug 2015 20:05:48 +0000 (+0000) Subject: Target attribute syntax compatibility fix - gcc uses no- rather than mno-. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40b29f5a3fc32c5cff0b9936335ce0a42dda278f;p=clang 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 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index eff9fde839..4cb9ebae3a 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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/test/CodeGen/attr-target-ppc.c b/test/CodeGen/attr-target-ppc.c index c98c70a646..d2901748b3 100644 --- a/test/CodeGen/attr-target-ppc.c +++ b/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/test/CodeGen/attr-target-x86.c b/test/CodeGen/attr-target-x86.c index b02dd71965..6f9a75e2d6 100644 --- a/test/CodeGen/attr-target-x86.c +++ b/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