diff options
| author | Yong He <yonghe@outlook.com> | 2022-04-12 15:23:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-12 15:23:53 -0700 |
| commit | 65c2e7f1ccc6cdb5daec343c7e32b4a9dc463ae4 (patch) | |
| tree | b13a93f5fa621a50ce3c100f018730c882ca3e9c /source/slang/slang-emit.cpp | |
| parent | 89560d62f3fb42e0f76cbae76c23eac437b65eba (diff) | |
Support `[DllImport]` (#2181)
* Support `[DllImport]`
* Fix.
* Fix.
* Fix array type emit in cpp.
* Fix.
* Fix.
* Fix
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 067d0a99a..d09217b58 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -9,6 +9,7 @@ #include "slang-ir-byte-address-legalize.h" #include "slang-ir-collect-global-uniforms.h" #include "slang-ir-dce.h" +#include "slang-ir-dll-import.h" #include "slang-ir-entry-point-uniforms.h" #include "slang-ir-entry-point-raw-ptr-params.h" #include "slang-ir-explicit-global-context.h" @@ -682,6 +683,15 @@ Result linkAndOptimizeIR( break; } + switch (target) + { + default: + break; + case CodeGenTarget::HostCPPSource: + generateDllImportFuncs(irModule, sink); + break; + } + // TODO: our current dynamic dispatch pass will remove all uses of witness tables. // If we are going to support function-pointer based, "real" modular dynamic dispatch, // we will need to disable this pass. |
