llvm_ir_generator: recognize inline and forceinline flags.

This commit is contained in:
whitequark 2017-01-25 10:25:00 +00:00
parent 7b6de36d1d
commit 57f54dbd12

View File

@ -532,6 +532,10 @@ class LLVMIRGenerator:
if func.is_cold:
self.llfunction.attributes.add('cold')
self.llfunction.attributes.add('noinline')
if 'inline' in func.flags:
self.llfunction.attributes.add('inlinehint')
if 'forceinline' in func.flags:
self.llfunction.attributes.add('alwaysinline')
self.llfunction.attributes.add('uwtable')
self.llfunction.attributes.personality = self.llbuiltin("__artiq_personality")