r199142 - Updating the attribute declarations to have the correct syntaxes. This means giving a __declspec spelling to: deprecated, naked, noinline, noreturn, and nothrow. uuid has no GNU spelling, so it was switched to __declspec. dllexport and dllimport both are now supported with GNU spellings.

Aaron Ballman aaron at aaronballman.com
Mon Jan 13 13:32:49 PST 2014


Author: aaronballman
Date: Mon Jan 13 15:32:48 2014
New Revision: 199142

URL: http://llvm.org/viewvc/llvm-project?rev=199142&view=rev
Log:
Updating the attribute declarations to have the correct syntaxes. This means giving a __declspec spelling to: deprecated, naked, noinline, noreturn, and nothrow. uuid has no GNU spelling, so it was switched to __declspec. dllexport and dllimport both are now supported with GNU spellings.

Modified:
    cfe/trunk/include/clang/Basic/Attr.td

Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=199142&r1=199141&r2=199142&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Mon Jan 13 15:32:48 2014
@@ -459,7 +459,7 @@ def OpenCLImageAccess : Attr {
 }
 
 def Deprecated : InheritableAttr {
-  let Spellings = [GNU<"deprecated">,
+  let Spellings = [GNU<"deprecated">, Declspec<"deprecated">,
                    CXX11<"gnu", "deprecated">, CXX11<"","deprecated">];
   let Args = [StringArgument<"Message", 1>];
 }
@@ -589,7 +589,7 @@ def Mode : Attr {
 }
 
 def Naked : InheritableAttr {
-  let Spellings = [GNU<"naked">, CXX11<"gnu", "naked">];
+  let Spellings = [GNU<"naked">, CXX11<"gnu", "naked">, Declspec<"naked">];
   let Subjects = SubjectList<[Function]>;
 }
 
@@ -618,7 +618,8 @@ def NoDebug : InheritableAttr {
 }
 
 def NoInline : InheritableAttr {
-  let Spellings = [GNU<"noinline">, CXX11<"gnu", "noinline">];
+  let Spellings = [GNU<"noinline">, CXX11<"gnu", "noinline">,
+                   Declspec<"noinline">];
   let Subjects = SubjectList<[Function]>;
 }
 
@@ -641,7 +642,8 @@ def NonNull : InheritableAttr {
 }
 
 def NoReturn : InheritableAttr {
-  let Spellings = [GNU<"noreturn">, CXX11<"gnu", "noreturn">];
+  let Spellings = [GNU<"noreturn">, CXX11<"gnu", "noreturn">,
+                   Declspec<"noreturn">];
   // FIXME: Does GCC allow this on the function instead?
 }
 
@@ -652,7 +654,8 @@ def NoInstrumentFunction : InheritableAt
 }
 
 def NoThrow : InheritableAttr {
-  let Spellings = [GNU<"nothrow">, CXX11<"gnu", "nothrow">];
+  let Spellings = [GNU<"nothrow">, CXX11<"gnu", "nothrow">,
+                   Declspec<"nothrow">];
 }
 
 def ObjCBridge : InheritableAttr {
@@ -908,7 +911,7 @@ def Used : InheritableAttr {
 }
 
 def Uuid : InheritableAttr {
-  let Spellings = [GNU<"uuid">];
+  let Spellings = [Declspec<"uuid">];
   let Args = [StringArgument<"Guid">];
 //  let Subjects = SubjectList<[CXXRecord]>;
   let LangOpts = [MicrosoftExt, Borland];
@@ -1258,12 +1261,14 @@ def MsStruct : InheritableAttr {
 }
 
 def DLLExport : InheritableAttr, TargetSpecificAttr<TargetX86Win> {
-  let Spellings = [Declspec<"dllexport">];
+  let Spellings = [Declspec<"dllexport">, GNU<"dllexport">,
+                   CXX11<"gnu", "dllexport">];
   let Subjects = SubjectList<[Function, Var]>;
 }
 
 def DLLImport : InheritableAttr, TargetSpecificAttr<TargetX86Win> {
-  let Spellings = [Declspec<"dllimport">];
+  let Spellings = [Declspec<"dllimport">, GNU<"dllimport">,
+                   CXX11<"gnu", "dllimport">];
   // Technically, the subjects for DllImport are Function and Var, but there is
   // custom semantic handling required when MicrosoftExt is true.
 }





More information about the cfe-commits mailing list