summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-08-25 21:55:05 -0700
committerGitHub <noreply@github.com>2020-08-25 21:55:05 -0700
commitb8702dfb6d0e41515fa0f9f899d86b7935dfc3fd (patch)
tree302e8e2bd8002de583101046bafeee4c16b2d7b7 /slang.h
parent4804753d4a2ec389cc6ecd759f7ea712848fddf0 (diff)
Export witness table and RTTI objects in compiled libraries. (#1514)
* Export witness table objects in compiled code. - Ensure that witness tables are preceeded with `extern "C"` modifier in the generated C++ code. - RTTI objects use the mangled name of the type directly, so that can be queried using the type's mangled name directly from the resulting DLL. - Expose `Linkage::getTypeConformanceWitnessMangledName` to return the mangled name of witness tables to the host. - Ensure that all witness tables (including those for associated types) have proper mangled name. * Fix GCC error in Slang generated code.
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/slang.h b/slang.h
index e00b813a8..1b79f97ab 100644
--- a/slang.h
+++ b/slang.h
@@ -3102,6 +3102,13 @@ namespace slang
LayoutRules rules = LayoutRules::Default,
ISlangBlob** outDiagnostics = nullptr) = 0;
+ /** Get the mangled name for a type witness.
+ */
+ virtual SLANG_NO_THROW SlangResult SLANG_MCALL getTypeConformanceWitnessMangledName(
+ TypeReflection* type,
+ TypeReflection* interfaceType,
+ ISlangBlob** outNameBlob) = 0;
+
/** Create a request to load/compile front-end code.
*/
virtual SLANG_NO_THROW SlangResult SLANG_MCALL createCompileRequest(