2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-28 20:53:35 +08:00

llvm_ir: fixed broken code in previous patch

This commit is contained in:
Timothy Ballance 2022-03-22 18:50:46 +08:00 committed by Sebastien Bourdeauducq
parent a289d69883
commit f91e106586

View File

@ -1584,9 +1584,9 @@ class LLVMIRGenerator:
insn.arguments(),
llnormalblock, llunwindblock)
elif types.is_external_function(functiontyp):
llfun, llargs, llarg_attrs = self._prepare_ffi_call(insn)
llfun, llargs, llarg_attrs, llcallstackptr = self._prepare_ffi_call(insn)
else:
llfun, llargs, llarg_attrs = self._prepare_closure_call(insn)
llfun, llargs, llarg_attrs, llcallstackptr = self._prepare_closure_call(insn)
if self.has_sret(functiontyp):
llstackptr = self.llbuilder.call(self.llbuiltin("llvm.stacksave"), [])
@ -1608,6 +1608,9 @@ class LLVMIRGenerator:
# The !tbaa metadata is not legal to use with the invoke instruction,
# so unlike process_Call, we do not set it here.
if llcallstackptr != None:
self.llbuilder.call(self.llbuiltin("llvm.stackrestore"), [llcallstackptr])
return llresult
def _quote_listish_to_llglobal(self, value, elt_type, path, kind_name):