Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/include/clang/Basic/Attr.td
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | class TargetArch<list<string> arches> { | ||||
list<string> Arches = arches; | list<string> Arches = arches; | ||||
list<string> OSes; | list<string> OSes; | ||||
list<string> CXXABIs; | list<string> CXXABIs; | ||||
} | } | ||||
def TargetARM : TargetArch<["arm", "thumb"]>; | def TargetARM : TargetArch<["arm", "thumb"]>; | ||||
def TargetMips : TargetArch<["mips", "mipsel"]>; | def TargetMips : TargetArch<["mips", "mipsel"]>; | ||||
def TargetMSP430 : TargetArch<["msp430"]>; | def TargetMSP430 : TargetArch<["msp430"]>; | ||||
def TargetX86 : TargetArch<["x86"]>; | def TargetX86 : TargetArch<["x86"]>; | ||||
def TargetAnyX86 : TargetArch<["x86", "x86_64"]>; | |||||
def TargetWindows : TargetArch<["x86", "x86_64", "arm", "thumb"]> { | def TargetWindows : TargetArch<["x86", "x86_64", "arm", "thumb"]> { | ||||
let OSes = ["Win32"]; | let OSes = ["Win32"]; | ||||
} | } | ||||
def TargetMicrosoftCXXABI : TargetArch<["x86", "x86_64", "arm", "thumb"]> { | def TargetMicrosoftCXXABI : TargetArch<["x86", "x86_64", "arm", "thumb"]> { | ||||
let CXXABIs = ["Microsoft"]; | let CXXABIs = ["Microsoft"]; | ||||
} | } | ||||
class Attr { | class Attr { | ||||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | |||||
def Annotate : InheritableParamAttr { | def Annotate : InheritableParamAttr { | ||||
let Spellings = [GNU<"annotate">]; | let Spellings = [GNU<"annotate">]; | ||||
let Args = [StringArgument<"Annotation">]; | let Args = [StringArgument<"Annotation">]; | ||||
let Documentation = [Undocumented]; | let Documentation = [Undocumented]; | ||||
} | } | ||||
def ARMInterrupt : InheritableAttr, TargetSpecificAttr<TargetARM> { | def ARMInterrupt : InheritableAttr, TargetSpecificAttr<TargetARM> { | ||||
// NOTE: If you add any additional spellings, MSP430Interrupt's and | // NOTE: If you add any additional spellings, MSP430Interrupt's, | ||||
// MipsInterrupt's spellings must match. | // MipsInterrupt's and AnyX86Interrupt's spellings must match. | ||||
let Spellings = [GNU<"interrupt">]; | let Spellings = [GNU<"interrupt">]; | ||||
let Args = [EnumArgument<"Interrupt", "InterruptType", | let Args = [EnumArgument<"Interrupt", "InterruptType", | ||||
["IRQ", "FIQ", "SWI", "ABORT", "UNDEF", ""], | ["IRQ", "FIQ", "SWI", "ABORT", "UNDEF", ""], | ||||
["IRQ", "FIQ", "SWI", "ABORT", "UNDEF", "Generic"], | ["IRQ", "FIQ", "SWI", "ABORT", "UNDEF", "Generic"], | ||||
1>]; | 1>]; | ||||
let ParseKind = "Interrupt"; | let ParseKind = "Interrupt"; | ||||
let HasCustomParsing = 1; | let HasCustomParsing = 1; | ||||
let Documentation = [ARMInterruptDocs]; | let Documentation = [ARMInterruptDocs]; | ||||
▲ Show 20 Lines • Show All 401 Lines • ▼ Show 20 Lines | |||||
def MSABI : InheritableAttr { | def MSABI : InheritableAttr { | ||||
let Spellings = [GCC<"ms_abi">]; | let Spellings = [GCC<"ms_abi">]; | ||||
// let Subjects = [Function, ObjCMethod]; | // let Subjects = [Function, ObjCMethod]; | ||||
let Documentation = [MSABIDocs]; | let Documentation = [MSABIDocs]; | ||||
} | } | ||||
def MSP430Interrupt : InheritableAttr, TargetSpecificAttr<TargetMSP430> { | def MSP430Interrupt : InheritableAttr, TargetSpecificAttr<TargetMSP430> { | ||||
// NOTE: If you add any additional spellings, ARMInterrupt's and | // NOTE: If you add any additional spellings, ARMInterrupt's, MipsInterrupt's | ||||
// MipsInterrupt's spellings must match. | // and AnyX86Interrupt's spellings must match. | ||||
let Spellings = [GNU<"interrupt">]; | let Spellings = [GNU<"interrupt">]; | ||||
let Args = [UnsignedArgument<"Number">]; | let Args = [UnsignedArgument<"Number">]; | ||||
let ParseKind = "Interrupt"; | let ParseKind = "Interrupt"; | ||||
let HasCustomParsing = 1; | let HasCustomParsing = 1; | ||||
let Documentation = [Undocumented]; | let Documentation = [Undocumented]; | ||||
} | } | ||||
def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips> { | def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips> { | ||||
let Spellings = [GCC<"mips16">]; | let Spellings = [GCC<"mips16">]; | ||||
let Subjects = SubjectList<[Function], ErrorDiag>; | let Subjects = SubjectList<[Function], ErrorDiag>; | ||||
let Documentation = [Undocumented]; | let Documentation = [Undocumented]; | ||||
} | } | ||||
def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips> { | def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips> { | ||||
// NOTE: If you add any additional spellings, ARMInterrupt's and | // NOTE: If you add any additional spellings, ARMInterrupt's, | ||||
// MSP430Interrupt's spellings must match. | // MSP430Interrupt's and AnyX86Interrupt's spellings must match. | ||||
let Spellings = [GNU<"interrupt">]; | let Spellings = [GNU<"interrupt">]; | ||||
let Subjects = SubjectList<[Function]>; | let Subjects = SubjectList<[Function]>; | ||||
let Args = [EnumArgument<"Interrupt", "InterruptType", | let Args = [EnumArgument<"Interrupt", "InterruptType", | ||||
["vector=sw0", "vector=sw1", "vector=hw0", | ["vector=sw0", "vector=sw1", "vector=hw0", | ||||
"vector=hw1", "vector=hw2", "vector=hw3", | "vector=hw1", "vector=hw2", "vector=hw3", | ||||
"vector=hw4", "vector=hw5", "eic", ""], | "vector=hw4", "vector=hw5", "eic", ""], | ||||
["sw0", "sw1", "hw0", "hw1", "hw2", "hw3", | ["sw0", "sw1", "hw0", "hw1", "hw2", "hw3", | ||||
"hw4", "hw5", "eic", "eic"] | "hw4", "hw5", "eic", "eic"] | ||||
▲ Show 20 Lines • Show All 648 Lines • ▼ Show 20 Lines | |||||
def WeakRef : InheritableAttr { | def WeakRef : InheritableAttr { | ||||
let Spellings = [GCC<"weakref">]; | let Spellings = [GCC<"weakref">]; | ||||
// A WeakRef that has an argument is treated as being an AliasAttr | // A WeakRef that has an argument is treated as being an AliasAttr | ||||
let Args = [StringArgument<"Aliasee", 1>]; | let Args = [StringArgument<"Aliasee", 1>]; | ||||
let Subjects = SubjectList<[Var, Function], ErrorDiag>; | let Subjects = SubjectList<[Var, Function], ErrorDiag>; | ||||
let Documentation = [Undocumented]; | let Documentation = [Undocumented]; | ||||
} | } | ||||
def AnyX86Interrupt : InheritableAttr, TargetSpecificAttr<TargetAnyX86> { | |||||
// NOTE: If you add any additional spellings, ARMInterrupt's, | |||||
// MSP430Interrupt's and MipsInterrupt's spellings must match. | |||||
let Spellings = [GNU<"interrupt">]; | |||||
let Subjects = SubjectList<[HasFunctionProto]>; | |||||
let ParseKind = "Interrupt"; | |||||
let HasCustomParsing = 1; | |||||
let Documentation = [AnyX86InterruptDocs]; | |||||
} | |||||
def X86ForceAlignArgPointer : InheritableAttr, TargetSpecificAttr<TargetX86> { | def X86ForceAlignArgPointer : InheritableAttr, TargetSpecificAttr<TargetX86> { | ||||
let Spellings = [GNU<"force_align_arg_pointer">]; | let Spellings = [GNU<"force_align_arg_pointer">]; | ||||
// Technically, this appertains to a FunctionDecl, but the target-specific | // Technically, this appertains to a FunctionDecl, but the target-specific | ||||
// code silently allows anything function-like (such as typedefs or function | // code silently allows anything function-like (such as typedefs or function | ||||
// pointers), but does not apply the attribute to them. | // pointers), but does not apply the attribute to them. | ||||
let Documentation = [Undocumented]; | let Documentation = [Undocumented]; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 635 Lines • Show Last 20 Lines |