about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2017-11-24 17:54:15 +0100
committerAjax <commial@gmail.com>2017-11-24 17:54:15 +0100
commit6eaf4ec8be66c2f014cec195543ac0e14ae48ea7 (patch)
tree4ff60a7d5507767771427a274d3c60824147cedc
parent3bdad0fb8c2d4d2603aad1c689f106aaabb54efb (diff)
downloadfocaccia-miasm-6eaf4ec8be66c2f014cec195543ac0e14ae48ea7.tar.gz
focaccia-miasm-6eaf4ec8be66c2f014cec195543ac0e14ae48ea7.zip
Update to new llvmlite way to get globals
-rw-r--r--miasm2/jitter/llvmconvert.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/jitter/llvmconvert.py b/miasm2/jitter/llvmconvert.py
index f84f7ed5..0f88d842 100644
--- a/miasm2/jitter/llvmconvert.py
+++ b/miasm2/jitter/llvmconvert.py
@@ -571,14 +571,14 @@ class LLVMFunction():
 
         base_name = "printf_format"
         count = 0
-        while self.mod.get_global("%s_%d" % (base_name, count)):
+        while "%s_%d" % (base_name, count) in self.mod.globals:
             count += 1
         global_fmt = self.global_constant("%s_%d" % (base_name, count),
                                           fmt_bytes)
         fnty = llvm_ir.FunctionType(llvm_ir.IntType(32), [cstring],
                                     var_arg=True)
         # Insert printf()
-        fn = mod.get_global('printf')
+        fn = mod.globals.get('printf', None)
         if fn is None:
             fn = llvm_ir.Function(mod, fnty, name="printf")
         # Call