diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-07 17:28:19 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-07 17:28:19 -0800 |
| commit | a810aa31f5f366d69e67be96c169fec7d6041df7 (patch) | |
| tree | 3c8697241d8f3381720661b6f5d3cdaac7789f5d /source/slang/slang-ast-val.cpp | |
| parent | 6492906ebe59b573f6243e7c44476944b9dd5592 (diff) | |
Link-time constant and linkage API improvements. (#3708)
* Link-time constant and linkage API improvements.
* Fix.
* Allow module name to be empty.
* Fix.
* Fix.
* Fix compile error.
Diffstat (limited to 'source/slang/slang-ast-val.cpp')
| -rw-r--r-- | source/slang/slang-ast-val.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-ast-val.cpp b/source/slang/slang-ast-val.cpp index d1408a3fc..b2b874fad 100644 --- a/source/slang/slang-ast-val.cpp +++ b/source/slang/slang-ast-val.cpp @@ -229,6 +229,11 @@ Val* GenericParamIntVal::_substituteImplOverride(ASTBuilder* /* astBuilder */, S return this; } +bool GenericParamIntVal::_isLinkTimeValOverride() +{ + return getDeclRef().getDecl()->hasModifier<ExternModifier>(); +} + // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ErrorIntVal !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! void ErrorIntVal::_toTextOverride(StringBuilder& out) @@ -1496,4 +1501,9 @@ Val* PolynomialIntVal::_resolveImplOverride() return this; } +bool IntVal::isLinkTimeVal() +{ + SLANG_AST_NODE_VIRTUAL_CALL(IntVal, isLinkTimeVal, ()); +} + } // namespace Slang |
