summaryrefslogtreecommitdiffstats
path: root/source/slang/mangle.h
blob: 8f4c6d1d05e3fd32a202071dc9eb5cb8d7b9c51d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef SLANG_MANGLE_H_INCLUDED
#define SLANG_MANGLE_H_INCLUDED

// This file implements the name mangling scheme for the Slang language.

#include "../core/basic.h"
#include "syntax.h"

namespace Slang
{
    String getMangledName(Decl* decl);
    String getMangledName(DeclRef<Decl> const & declRef);
    String getMangledName(DeclRefBase const & declRef);

    String mangleSpecializedFuncName(String baseName, SubstitutionSet subst);
    String getMangledNameForConformanceWitness(
        Type* sub,
        Type* sup);
    String getMangledNameForConformanceWitness(
        DeclRef<Decl> sub,
        DeclRef<Decl> sup);
    String getMangledNameForConformanceWitness(
        DeclRef<Decl> sub,
        Type* sup);
    String getMangledTypeName(Type* type);
}

#endif