transforms.llvm_ir_generator: don't assert on inlined functions.

This commit is contained in:
whitequark 2015-11-24 00:20:33 +08:00
parent 37b80247f1
commit 32fe4a8a0c

View File

@ -541,7 +541,7 @@ class LLVMIRGenerator:
# The environment argument is an i8*, so that all closures can # The environment argument is an i8*, so that all closures can
# unify with each other regardless of environment type or size. # unify with each other regardless of environment type or size.
# We fixup the type on assignment into the "$outer" slot. # We fixup the type on assignment into the "$outer" slot.
assert isinstance(insn.value(), ir.EnvironmentArgument) assert insn.var_name == '$outer'
llvalue = self.llbuilder.bitcast(llvalue, llptr.type.pointee) llvalue = self.llbuilder.bitcast(llvalue, llptr.type.pointee)
return self.llbuilder.store(llvalue, llptr) return self.llbuilder.store(llvalue, llptr)