transforms.llvm_ir_generator: handle loop instruction (fixes #202).

This commit is contained in:
whitequark 2015-12-21 21:12:04 +08:00
parent 007a7170e1
commit f957be4e6f
1 changed files with 2 additions and 0 deletions

View File

@ -1089,6 +1089,8 @@ class LLVMIRGenerator:
return self.llbuilder.cbranch(self.map(insn.condition()), return self.llbuilder.cbranch(self.map(insn.condition()),
self.map(insn.if_true()), self.map(insn.if_false())) self.map(insn.if_true()), self.map(insn.if_false()))
process_Loop = process_BranchIf
def process_IndirectBranch(self, insn): def process_IndirectBranch(self, insn):
llinsn = self.llbuilder.branch_indirect(self.map(insn.target())) llinsn = self.llbuilder.branch_indirect(self.map(insn.target()))
for dest in insn.destinations(): for dest in insn.destinations():