forked from M-Labs/artiq
1
0
Fork 0

Return LLVM IR module from LLVMIRGenerator.process.

This commit is contained in:
whitequark 2015-07-22 04:13:04 +03:00
parent 986d9d944f
commit dff4ce7e3a
2 changed files with 3 additions and 2 deletions

View File

@ -34,8 +34,7 @@ class Module:
self.artiq_ir = artiq_ir_generator.visit(self.typedtree)
dead_code_eliminator.process(self.artiq_ir)
local_access_validator.process(self.artiq_ir)
llvm_ir_generator.process(self.artiq_ir)
self.llvm_ir = llvm_ir_generator.llmodule
self.llvm_ir = llvm_ir_generator.process(self.artiq_ir)
@classmethod
def from_string(cls, source_string, name="input.py", first_line=1, engine=None):

View File

@ -130,6 +130,8 @@ class LLVMIRGenerator:
for func in functions:
self.process_function(func)
return self.llmodule
def process_function(self, func):
try:
self.llfunction = self.llmodule.get_global(func.name)