Exemplo n.º 1
0
 def call_abstract(self, name, restype, *args):
     argtys = [x.getType() for x in args]
     callee = llvm_utils.get_or_insert_func(self.lmod, name,
                                            restype, argtys)
     callee.setLinkage(llvm.GlobalValue.LinkageTypes.ExternalLinkage)
     return self.builder.CreateCall(callee, args)
Exemplo n.º 2
0
 def call_abstract_pred(self, name, *args):
     argtys = [x.getType() for x in args]
     retty = llvm_types.i1
     callee = llvm_utils.get_or_insert_func(self.lmod, name,
                                            retty, argtys)
     return self.builder.CreateCall(callee, args)
Exemplo n.º 3
0
 def make_func(cls, lmod, name, opague_type, argnames):
     argtys = [opague_type] * len(argnames)
     restype = opague_type
     lfunc = llvm_utils.get_or_insert_func(
         lmod, name, restype, argtys)
     return lfunc