diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-20 15:37:11 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 15:37:11 -0800 |
| commit | a62be597990966b9516995650baf750ee6a0146b (patch) | |
| tree | 1741b3d5b5859319f278aa6ab821a2f801fd8e08 /source/slang/slang-ast-decl.cpp | |
| parent | 4d20fd329956ac89408b1628a8291fea01bc9a6d (diff) | |
Support link time type specialization. (#3604)
Diffstat (limited to 'source/slang/slang-ast-decl.cpp')
| -rw-r--r-- | source/slang/slang-ast-decl.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/slang/slang-ast-decl.cpp b/source/slang/slang-ast-decl.cpp index 9dbd006a0..cd9c43410 100644 --- a/source/slang/slang-ast-decl.cpp +++ b/source/slang/slang-ast-decl.cpp @@ -136,4 +136,19 @@ InterfaceDecl* ThisTypeConstraintDecl::getInterfaceDecl() return as<InterfaceDecl>(parentDecl->parentDecl); } +void AggTypeDecl::addTag(TypeTag tag) +{ + typeTags = (TypeTag)((int)tag | (int)tag); +} + +bool AggTypeDecl::hasTag(TypeTag tag) +{ + return ((int)typeTags & (int)tag) != 0; +} + +void AggTypeDecl::unionTagsWith(TypeTag other) +{ + addTag(other); +} + } // namespace Slang |
