summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-mangle.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-11-18 14:52:58 -0500
committerGitHub <noreply@github.com>2020-11-18 14:52:58 -0500
commitd898d561e3c76ecf38db434ec7fbb4bbd0e25cb2 (patch)
tree7d92bcf80430a6d3e065aac9fc06a2c44b1cf5fa /source/slang/slang-mangle.cpp
parentbdc589b0b1360cd06c48f88a117c55e84198ab23 (diff)
Serialized stdlib working (#1603)
* #include an absolute path didn't work - because paths were taken to always be relative. * Mangling/module name extraction for GenericDecl * Add comment on SerialFilter to explain re-enabling Stmt. * Support setting up SyntaxDecl when reconstructed after deserialization. * Improvements to setup SyntaxDecl. * Fix typo so can read compressed SourceLocs. * Fix issue with SourceManger.
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