transforms.llvm_ir_generator: don't crash if embedding is not enabled.

This commit is contained in:
whitequark 2016-01-03 19:07:11 +08:00
parent 81427af506
commit 3aa5acbaf3

View File

@ -412,7 +412,7 @@ class LLVMIRGenerator:
if any(functions):
self.debug_info_emitter.finalize(functions[0].loc.source_buffer)
if attribute_writeback:
if attribute_writeback and self.object_map is not None:
self.emit_attribute_writeback()
return self.llmodule