mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
python: Fix check for disasm creation failure
Check should be for pointer being NULL, not what it points to. Also adds a test for this case. Reviewed By: indygreg Differential Revision: http://llvm-reviews.chandlerc.com/D1878 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194965 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -75,7 +75,7 @@ class Disassembler(LLVMObject):
|
||||
|
||||
ptr = lib.LLVMCreateDisasm(c_char_p(triple), c_void_p(None), c_int(0),
|
||||
callbacks['op_info'](0), callbacks['symbol_lookup'](0))
|
||||
if not ptr.contents:
|
||||
if not ptr:
|
||||
raise Exception('Could not obtain disassembler for triple: %s' %
|
||||
triple)
|
||||
|
||||
|
Reference in New Issue
Block a user