From 509e36b62de7578843abc2547921beadff7a3ce0 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 25 Jun 2020 14:01:33 -0700 Subject: Remove interfaceType operand from lookup_witness_method inst --- source/slang/slang-ir.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 07cb957db..8cf7ab171 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -1408,10 +1408,7 @@ namespace Slang inst->op = op; - if (type) - { - inst->typeUse.init(inst, type); - } + inst->typeUse.init(inst, type); maybeSetSourceLoc(builder, inst); @@ -1423,6 +1420,10 @@ namespace Slang { operand->init(inst, fixedArgs[aa]); } + else + { + operand->init(inst, nullptr); + } operand++; } @@ -2518,16 +2519,14 @@ namespace Slang IRInst* IRBuilder::emitLookupInterfaceMethodInst( IRType* type, IRInst* witnessTableVal, - IRInst* interfaceMethodVal, - IRType* interfaceType) + IRInst* interfaceMethodVal) { - IRInst* args[3] = { witnessTableVal , interfaceMethodVal, interfaceType }; auto inst = createInst( this, kIROp_lookup_interface_method, type, - 3, - args); + witnessTableVal, + interfaceMethodVal); addInst(inst); return inst; -- cgit v1.2.3