summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-mangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-mangle.cpp')
-rw-r--r--source/slang/slang-mangle.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/slang-mangle.cpp b/source/slang/slang-mangle.cpp
index ab90f4bc2..a08b05a5d 100644
--- a/source/slang/slang-mangle.cpp
+++ b/source/slang/slang-mangle.cpp
@@ -415,6 +415,19 @@ namespace Slang
// declarations out of this...
else if(as<VarDeclBase>(decl))
emitRaw(context, "V");
+ else if(DeclRef<GenericDecl> genericDecl = declRef.as<GenericDecl>())
+ {
+ // Mark that this is a generic, so we can differentiate bewteen when
+ // mangling the generic and the inner entity
+ emitRaw(context, "G");
+
+ SLANG_ASSERT(genericDecl.substitutions == nullptr);
+
+ auto innerDecl = makeDeclRef(getInner(genericDecl));
+
+ emitQualifiedName(context, innerDecl);
+ return;
+ }
else
{
// TODO: handle other cases