mirror of https://github.com/m-labs/artiq.git
Commit missing parts of 7f914a0
.
This commit is contained in:
parent
225f7d7302
commit
63f7899f93
|
@ -191,6 +191,7 @@ class LLVMIRGenerator:
|
||||||
and len(lltyp.elements) <= 2:
|
and len(lltyp.elements) <= 2:
|
||||||
return not any([self.needs_sret(elt, may_be_large=False) for elt in lltyp.elements])
|
return not any([self.needs_sret(elt, may_be_large=False) for elt in lltyp.elements])
|
||||||
else:
|
else:
|
||||||
|
assert isinstance(lltyp, ll.Type)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def has_sret(self, functy):
|
def has_sret(self, functy):
|
||||||
|
@ -1239,7 +1240,7 @@ class LLVMIRGenerator:
|
||||||
return self.llbuilder.ret_void()
|
return self.llbuilder.ret_void()
|
||||||
else:
|
else:
|
||||||
llvalue = self.map(insn.value())
|
llvalue = self.map(insn.value())
|
||||||
if self.needs_sret(llvalue):
|
if self.needs_sret(llvalue.type):
|
||||||
self.llbuilder.store(llvalue, self.llfunction.args[0])
|
self.llbuilder.store(llvalue, self.llfunction.args[0])
|
||||||
return self.llbuilder.ret_void()
|
return self.llbuilder.ret_void()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue