summaryrefslogtreecommitdiff
path: root/source/slang/mangle.h
blob: 40679695172a1889d58e1126af5672a1eec1976f (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
#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, RefPtr<Substitutions> subst);
    String getMangledNameForConformanceWitness(
        Type* sub,
        Type* sup);
    String getMangledNameForConformanceWitness(
        DeclRef<Decl> sub,
        DeclRef<Decl> sup);
    String getMangledTypeName(Type* type);
}

#endif