diff options
| author | Yong He <yonghe@google.com> | 2019-01-29 11:41:54 -0800 |
|---|---|---|
| committer | Yong He <yonghe@google.com> | 2019-01-29 11:41:54 -0800 |
| commit | b7f8f7abcc3cc1dfa820ebba47a772b78d6a4cfb (patch) | |
| tree | 26d81dec1162ee9d26b811f0b7621e74ade9e06f /source/slang/core.meta.slang.h | |
| parent | f8b8ea0055ad877551198e1e295d33860b504672 (diff) | |
Add support for user defined attributes.
Diffstat (limited to 'source/slang/core.meta.slang.h')
| -rw-r--r-- | source/slang/core.meta.slang.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/core.meta.slang.h b/source/slang/core.meta.slang.h index a29fc24ce..746e75bd9 100644 --- a/source/slang/core.meta.slang.h +++ b/source/slang/core.meta.slang.h @@ -1304,3 +1304,15 @@ SLANG_RAW(" ///\n") SLANG_RAW(" /// This is equivalent to the LLVM `readnone` function attribute.\n") SLANG_RAW("__attributeTarget(FunctionDeclBase)\n") SLANG_RAW("attribute_syntax [__readNone] : ReadNoneAttribute;\n") +SLANG_RAW("\n") +SLANG_RAW("enum AttributeTargets\n") +SLANG_RAW("{\n") + + sb << "Struct = " << (int)UserDefinedAttributeTargets::Struct << ", "; + sb << "Var = " << (int)UserDefinedAttributeTargets::Var << ", "; + sb << "Function = " << (int)UserDefinedAttributeTargets::Function; + +SLANG_RAW("\n") +SLANG_RAW("};\n") +SLANG_RAW("__attributeTarget(StructDecl)\n") +SLANG_RAW("attribute_syntax [AttributeUsage(target : AttributeTargets)] : AttributeUsageAttribute;") |
