https://github.com/shader-slang/slang
Raw File
Tip revision: 5902acdabc4445a65741a7a6a3a95f223e301059 authored by Yong He on 23 January 2024, 07:19:40 UTC
[LSP] Fetch configs directly from didConfigurationChanged message. (#3478)
Tip revision: 5902acd
slang-mangle.h
#ifndef SLANG_MANGLE_H_INCLUDED
#define SLANG_MANGLE_H_INCLUDED

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

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

namespace Slang
{
    struct IRSpecialize;

    String getMangledName(ASTBuilder* astBuilder, Decl* decl);
    String getMangledName(ASTBuilder* astBuilder, DeclRefBase* declRef);
    String getMangledNameFromNameString(const UnownedStringSlice& name);

    String getHashedName(const UnownedStringSlice& mangledName);

    String getMangledNameForConformanceWitness(
        ASTBuilder* astBuilder,
        Type* sub,
        Type* sup);
    String getMangledNameForConformanceWitness(
        ASTBuilder* astBuilder,
        DeclRef<Decl> sub,
        DeclRef<Decl> sup);
    String getMangledNameForConformanceWitness(
        ASTBuilder* astBuilder,
        DeclRef<Decl> sub,
        Type* sup);
    String getMangledTypeName(
        ASTBuilder* astBuilder,
        Type* type);
}

#endif
back to top