diff options
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 77011b569..ef5ecb959 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++; } @@ -2194,6 +2195,21 @@ namespace Slang return (IRStringType*)getType(kIROp_StringType); } + IRAssociatedType* IRBuilder::getAssociatedType() + { + return (IRAssociatedType*)getType(kIROp_AssociatedType); + } + + IRThisType* IRBuilder::getThisType() + { + return (IRThisType*)getType(kIROp_ThisType); + } + + IRRawPointerType* IRBuilder::getRawPointerType() + { + return (IRRawPointerType*)getType(kIROp_RawPointerType); + } + IRBasicBlockType* IRBuilder::getBasicBlockType() { return (IRBasicBlockType*)getType(kIROp_BasicBlockType); @@ -2811,6 +2827,20 @@ namespace Slang return entry; } + IRInterfaceRequirementEntry* IRBuilder::createInterfaceRequirementEntry( + IRInst* requirementKey, + IRInst* requirementVal) + { + IRInterfaceRequirementEntry* entry = createInst<IRInterfaceRequirementEntry>( + this, + kIROp_InterfaceRequirementEntry, + nullptr, + requirementKey, + requirementVal); + addGlobalValue(this, entry); + return entry; + } + IRStructType* IRBuilder::createStructType() { IRStructType* structType = createInst<IRStructType>( |
