diff options
Diffstat (limited to 'source/slang/mangle.cpp')
| -rw-r--r-- | source/slang/mangle.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/mangle.cpp b/source/slang/mangle.cpp index 29446d942..f2bf279a2 100644 --- a/source/slang/mangle.cpp +++ b/source/slang/mangle.cpp @@ -373,6 +373,13 @@ namespace Slang String getMangledName(DeclRef<Decl> const& declRef) { + // Special case: if a declaration is the result of a type legalization + // transformation, then it should just get the mangled name of the + // original declaration, and not the one that would be computed + // for it otherwise. + if(auto legalizedModifier = declRef.getDecl()->FindModifier<LegalizedModifier>()) + return legalizedModifier->originalMangledName; + ManglingContext context; mangleName(&context, declRef); return context.sb.ProduceString(); |
