diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-26 17:00:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-26 17:00:31 -0800 |
| commit | 39522159c245e32a99cfdc47f03236f7028f5c61 (patch) | |
| tree | 4ae93fb32f267f7caa5ce55a6a52aac9f1f33bdd /source/slang/slang-ir.cpp | |
| parent | 1d8e93cd434f0c7acbb6db747b32c3a3720c5c2e (diff) | |
Allow default values for `extern` symbols. (#3632)
* Allow default values for `extern` symbols.
* Fix.
* Fix test.
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 035b2aade..a016679e7 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -32,7 +32,15 @@ namespace Slang if (!irObject) return; if (auto nameHint = irObject->findDecoration<IRNameHintDecoration>()) + { sb << nameHint->getName(); + return; + } + if (auto linkage = irObject->findDecoration<IRLinkageDecoration>()) + { + sb << linkage->getMangledName(); + return; + } } // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
