mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
Ensure uwtable is added to all generated functions.
This commit is contained in:
parent
13ad9b5d08
commit
22457bc19c
@ -175,6 +175,7 @@ class LLVMIRGenerator:
|
||||
def process_function(self, func):
|
||||
try:
|
||||
self.llfunction = self.llmodule.get_global(func.name)
|
||||
|
||||
if self.llfunction is None:
|
||||
llargtys = []
|
||||
for arg in func.arguments:
|
||||
@ -182,10 +183,12 @@ class LLVMIRGenerator:
|
||||
llfunty = ll.FunctionType(args=llargtys,
|
||||
return_type=self.llty_of_type(func.type.ret, for_return=True))
|
||||
self.llfunction = ll.Function(self.llmodule, llfunty, func.name)
|
||||
self.llfunction.attributes.add('uwtable')
|
||||
|
||||
if func.is_internal:
|
||||
self.llfunction.linkage = 'internal'
|
||||
|
||||
self.llfunction.attributes.add('uwtable')
|
||||
|
||||
self.llmap = {}
|
||||
self.llbuilder = ll.IRBuilder()
|
||||
self.fixups = []
|
||||
|
Loading…
Reference in New Issue
Block a user