summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 889ac8203..b9381eec3 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -623,6 +623,20 @@ SLANG_NO_THROW slang::TypeLayoutReflection* SLANG_MCALL Linkage::getTypeLayout(
return asExternal(typeLayout);
}
+SLANG_NO_THROW SlangResult SLANG_MCALL Linkage::getTypeRTTIMangledName(
+ slang::TypeReflection* type, ISlangBlob** outNameBlob)
+{
+ auto internalType = asInternal(type);
+ if (auto declRefType = as<DeclRefType>(internalType))
+ {
+ auto name = getMangledName(internalType->getASTBuilder(), declRefType->declRef);
+ Slang::ComPtr<ISlangBlob> blob = Slang::StringUtil::createStringBlob(name);
+ *outNameBlob = blob.detach();
+ return SLANG_OK;
+ }
+ return SLANG_FAIL;
+}
+
SLANG_NO_THROW SlangResult SLANG_MCALL Linkage::getTypeConformanceWitnessMangledName(
slang::TypeReflection* type, slang::TypeReflection* interfaceType, ISlangBlob** outNameBlob)
{