diff options
| author | Ronan <ro.cailleau@gmail.com> | 2025-04-03 06:17:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-03 04:17:15 +0000 |
| commit | 6b44630afe4ff180ba608142e9515abcd369775e (patch) | |
| tree | 67e895172552fd3c73d6830436e30fa157142742 /source/slang/slang-mangle.h | |
| parent | b4a1d618b8d850a579af2840db2df6bee312172c (diff) | |
Fixed generic interface specialization crashes (#6601): (#6688)
* Fixed generic interface specialization crashes:
- Add an export decoration to specialized generic interfaces.
* Fixed generic interface specialization crashes:
- Add an export decoration to specialized generic interfaces.
- Use getTypeNameHint(...) instead of a manual mangler.
* In cloneInstDecorationsAndChildren: specialize all linkage decorations, not just the exports.
- If a linkage decoration is already present, it is not specialized and replaced by the specialized one.
- If a specialization uses the TypeNameHint, sanitize it to be used as an identifier.
- Use the identifier name sanitizer from slang-mangle.
* Added tests/generics/generic-interface-linkage.slang
- See #6601 and #6688
Diffstat (limited to 'source/slang/slang-mangle.h')
| -rw-r--r-- | source/slang/slang-mangle.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-mangle.h b/source/slang/slang-mangle.h index cfdbe461b..079f7c02d 100644 --- a/source/slang/slang-mangle.h +++ b/source/slang/slang-mangle.h @@ -10,6 +10,8 @@ namespace Slang { struct IRSpecialize; +void emitNameForLinkage(StringBuilder& sb, UnownedStringSlice str); + String getMangledName(ASTBuilder* astBuilder, Decl* decl); String getMangledName(ASTBuilder* astBuilder, DeclRefBase* declRef); String getMangledNameFromNameString(const UnownedStringSlice& name); |
