Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/Basic/Attr.td
Show First 20 Lines • Show All 602 Lines • ▼ Show 20 Lines | |||||
/// Some attributes, like calling conventions, can appear in either the | /// Some attributes, like calling conventions, can appear in either the | ||||
/// declaration or the type position. These attributes are morally type | /// declaration or the type position. These attributes are morally type | ||||
/// attributes, but have historically been written on declarations. | /// attributes, but have historically been written on declarations. | ||||
class DeclOrTypeAttr : InheritableAttr; | class DeclOrTypeAttr : InheritableAttr; | ||||
/// A attribute is either a declaration attribute or a statement attribute. | /// A attribute is either a declaration attribute or a statement attribute. | ||||
class DeclOrStmtAttr : InheritableAttr; | class DeclOrStmtAttr : InheritableAttr; | ||||
/// An attribute class for HLSL Annotations. | |||||
class HLSLAnnotationAttr : InheritableAttr; | |||||
/// A target-specific attribute. This class is meant to be used as a mixin | /// A target-specific attribute. This class is meant to be used as a mixin | ||||
/// with InheritableAttr or Attr depending on the attribute's needs. | /// with InheritableAttr or Attr depending on the attribute's needs. | ||||
class TargetSpecificAttr<TargetSpec target> { | class TargetSpecificAttr<TargetSpec target> { | ||||
TargetSpec Target = target; | TargetSpec Target = target; | ||||
// Attributes are generally required to have unique spellings for their names | // Attributes are generally required to have unique spellings for their names | ||||
// so that the parser can determine what kind of attribute it has parsed. | // so that the parser can determine what kind of attribute it has parsed. | ||||
// However, target-specific attributes are special in that the attribute only | // However, target-specific attributes are special in that the attribute only | ||||
// "exists" for a given target. So two target-specific attributes can share | // "exists" for a given target. So two target-specific attributes can share | ||||
▲ Show 20 Lines • Show All 3,387 Lines • ▼ Show 20 Lines | |||||
def HLSLNumThreads: InheritableAttr { | def HLSLNumThreads: InheritableAttr { | ||||
let Spellings = [Microsoft<"numthreads">]; | let Spellings = [Microsoft<"numthreads">]; | ||||
let Args = [IntArgument<"X">, IntArgument<"Y">, IntArgument<"Z">]; | let Args = [IntArgument<"X">, IntArgument<"Y">, IntArgument<"Z">]; | ||||
let Subjects = SubjectList<[HLSLEntry]>; | let Subjects = SubjectList<[HLSLEntry]>; | ||||
let LangOpts = [HLSL]; | let LangOpts = [HLSL]; | ||||
let Documentation = [NumThreadsDocs]; | let Documentation = [NumThreadsDocs]; | ||||
} | } | ||||
def HLSLSV_GroupIndex: InheritableAttr { | def HLSLSV_GroupIndex: HLSLAnnotationAttr { | ||||
let Spellings = [HLSLSemantic<"SV_GroupIndex">]; | let Spellings = [HLSLSemantic<"SV_GroupIndex">]; | ||||
let Subjects = SubjectList<[ParmVar, GlobalVar]>; | let Subjects = SubjectList<[ParmVar, GlobalVar]>; | ||||
let LangOpts = [HLSL]; | let LangOpts = [HLSL]; | ||||
let Documentation = [HLSLSV_GroupIndexDocs]; | let Documentation = [HLSLSV_GroupIndexDocs]; | ||||
} | } | ||||
def HLSLShader : InheritableAttr { | def HLSLShader : InheritableAttr { | ||||
let Spellings = [Microsoft<"shader">]; | let Spellings = [Microsoft<"shader">]; | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |