diff options
| author | Yong He <yonghe@outlook.com> | 2018-01-13 13:17:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-13 13:17:02 -0800 |
| commit | d4dab2cd3a409411c2d7caed01fc02a0fd3e8450 (patch) | |
| tree | 10c92df406a82e7a5eb24b56c17d9256a7183c44 /source/slang/mangle.cpp | |
| parent | df6eeb93c1718334779ae328db277cdf7a9d7b04 (diff) | |
| parent | 4d2086f47e25aa4545df95ddfd260c8bc5aafdb2 (diff) | |
Merge pull request #364 from csyonghe/assoctype
Support nested generics
Diffstat (limited to 'source/slang/mangle.cpp')
| -rw-r--r-- | source/slang/mangle.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/slang/mangle.cpp b/source/slang/mangle.cpp index 070c2b172..1a412d041 100644 --- a/source/slang/mangle.cpp +++ b/source/slang/mangle.cpp @@ -408,6 +408,22 @@ namespace Slang } String getMangledNameForConformanceWitness( + DeclRef<Decl> sub, + Type* sup) + { + // The mangled form for a witness that `sub` + // conforms to `sup` will be named: + // + // {Conforms(sub,sup)} => _SW{sub}{sup} + // + ManglingContext context; + emitRaw(&context, "_SW"); + emitQualifiedName(&context, sub); + emitType(&context, sup); + return context.sb.ProduceString(); + } + + String getMangledNameForConformanceWitness( Type* sub, Type* sup) { |
