https://github.com/shader-slang/slang
Raw File
Tip revision: 0586f3298fa7d554fa2682103eefba88740d6758 authored by jsmall-nvidia on 18 January 2023, 19:11:50 UTC
Upgrade slang-llvm-13.x-33 (#2600)
Tip revision: 0586f32
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, DeclRef<Decl> const & declRef);
    String getMangledName(ASTBuilder* astBuilder, DeclRefBase const & 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