https://github.com/shader-slang/slang
Raw File
Tip revision: e6dc9a9eed58bdfd9c6f4016864acfe60381f927 authored by Yong He on 27 October 2022, 20:08:45 UTC
Rename 'IDifferentiable.zero' -> `IDifferentiable.dzero`. (#2474)
Tip revision: e6dc9a9
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