summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-04-12 15:23:53 -0700
committerGitHub <noreply@github.com>2022-04-12 15:23:53 -0700
commit65c2e7f1ccc6cdb5daec343c7e32b4a9dc463ae4 (patch)
treeb13a93f5fa621a50ce3c100f018730c882ca3e9c /source/slang/slang-ir.cpp
parent89560d62f3fb42e0f76cbae76c23eac437b65eba (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-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index bb1b0a9d2..09a28e394 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -2466,6 +2466,11 @@ namespace Slang
return (IRBasicType*)getType(kIROp_UInt64Type);
}
+ IRBasicType* IRBuilder::getCharType()
+ {
+ return (IRBasicType*)getType(kIROp_CharType);
+ }
+
IRStringType* IRBuilder::getStringType()
{
return (IRStringType*)getType(kIROp_StringType);
@@ -2962,20 +2967,6 @@ namespace Slang
return inst;
}
- IRInst* IRBuilder::emitCopy(IRInst* dst, IRInst* src, IRInst* rttiObjPtr)
- {
- IRInst* args[] = { dst, src, rttiObjPtr };
- auto inst = createInst<IRCopy>(
- this,
- kIROp_Copy,
- getVoidType(),
- 3,
- args);
-
- addInst(inst);
- return inst;
- }
-
IRInst* IRBuilder::emitPackAnyValue(IRType* type, IRInst* value)
{
auto inst = createInst<IRPackAnyValue>(