diff options
| author | Yong He <yonghe@outlook.com> | 2020-06-25 14:01:33 -0700 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2020-06-25 14:01:33 -0700 |
| commit | 509e36b62de7578843abc2547921beadff7a3ce0 (patch) | |
| tree | a74096fa8a71a69f5645fc7ad4b94b0bf8860ac1 /source/slang/slang-ir.cpp | |
| parent | a1fed5e49bc1c8452752d13d401ee0bbbc5c71c4 (diff) | |
Remove interfaceType operand from lookup_witness_method inst
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
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<IRLookupWitnessMethod>( this, kIROp_lookup_interface_method, type, - 3, - args); + witnessTableVal, + interfaceMethodVal); addInst(inst); return inst; |
