From 6eaf4ec8be66c2f014cec195543ac0e14ae48ea7 Mon Sep 17 00:00:00 2001 From: Ajax Date: Fri, 24 Nov 2017 17:54:15 +0100 Subject: Update to new llvmlite way to get globals --- miasm2/jitter/llvmconvert.py | 4 ++-- 1 file 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 -- cgit 1.4.1