Skip to content

Commit 22457bc

Browse files
author
whitequark
committedAug 8, 2015
Ensure uwtable is added to all generated functions.
1 parent 13ad9b5 commit 22457bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

Diff for: ‎artiq/compiler/transforms/llvm_ir_generator.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,20 @@ def process(self, functions):
175175
def process_function(self, func):
176176
try:
177177
self.llfunction = self.llmodule.get_global(func.name)
178+
178179
if self.llfunction is None:
179180
llargtys = []
180181
for arg in func.arguments:
181182
llargtys.append(self.llty_of_type(arg.type))
182183
llfunty = ll.FunctionType(args=llargtys,
183184
return_type=self.llty_of_type(func.type.ret, for_return=True))
184185
self.llfunction = ll.Function(self.llmodule, llfunty, func.name)
185-
self.llfunction.attributes.add('uwtable')
186+
186187
if func.is_internal:
187188
self.llfunction.linkage = 'internal'
188189

190+
self.llfunction.attributes.add('uwtable')
191+
189192
self.llmap = {}
190193
self.llbuilder = ll.IRBuilder()
191194
self.fixups = []

0 commit comments

Comments
 (0)
Please sign in to comment.