diff options
Diffstat (limited to 'bindings/python/llvm/bit_reader.py')
-rw-r--r-- | bindings/python/llvm/bit_reader.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bindings/python/llvm/bit_reader.py b/bindings/python/llvm/bit_reader.py index 5bf5e22025a3..33b8211076b8 100644 --- a/bindings/python/llvm/bit_reader.py +++ b/bindings/python/llvm/bit_reader.py @@ -16,16 +16,15 @@ lib = get_library() def parse_bitcode(mem_buffer): """Input is .core.MemoryBuffer""" module = c_object_p() - out = c_char_p(None) - result = lib.LLVMParseBitcode(mem_buffer, byref(module), byref(out)) + result = lib.LLVMParseBitcode2(mem_buffer, byref(module)) if result: - raise RuntimeError('LLVM Error: %s' % out.value) + raise RuntimeError('LLVM Error') m = Module(module) m.take_ownership(mem_buffer) return m def register_library(library): - library.LLVMParseBitcode.argtypes = [MemoryBuffer, POINTER(c_object_p), POINTER(c_char_p)] - library.LLVMParseBitcode.restype = bool + library.LLVMParseBitcode2.argtypes = [MemoryBuffer, POINTER(c_object_p)] + library.LLVMParseBitcode2.restype = bool register_library(lib) |