diff options
Diffstat (limited to 'source/slang/mangle.cpp')
| -rw-r--r-- | source/slang/mangle.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/slang/mangle.cpp b/source/slang/mangle.cpp index 68fa7f31b..e2db1b456 100644 --- a/source/slang/mangle.cpp +++ b/source/slang/mangle.cpp @@ -24,6 +24,13 @@ namespace Slang context->sb.append(value); } + void emit( + ManglingContext* context, + String const& value) + { + context->sb.append(value); + } + void emitName( ManglingContext* context, Name* name) @@ -117,6 +124,14 @@ namespace Slang { emitQualifiedName(context, declRefType->declRef); } + else if (auto tupleType = dynamic_cast<FilteredTupleType*>(type)) + { + // TODO: this doesn't handle the possibility of multiple different + // filtered versions of the same type... + emitRaw(context, "t"); + emitType(context, tupleType->originalType); + emitRaw(context, "_"); + } else { SLANG_UNEXPECTED("unimplemented case in mangling"); @@ -398,4 +413,12 @@ namespace Slang return context.sb.ProduceString(); } + String getMangledTypeName(Type* type) + { + ManglingContext context; + emitType(&context, type); + return context.sb.ProduceString(); + } + + } |
