From 65c2e7f1ccc6cdb5daec343c7e32b4a9dc463ae4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 12 Apr 2022 15:23:53 -0700 Subject: Support `[DllImport]` (#2181) * Support `[DllImport]` * Fix. * Fix. * Fix array type emit in cpp. * Fix. * Fix. * Fix Co-authored-by: Yong He --- source/slang/slang-ir.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'source/slang/slang-ir.cpp') 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( - this, - kIROp_Copy, - getVoidType(), - 3, - args); - - addInst(inst); - return inst; - } - IRInst* IRBuilder::emitPackAnyValue(IRType* type, IRInst* value) { auto inst = createInst( -- cgit v1.2.3