[python-bindings] Fixed 3 test failures caused by typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman
2013-09-11 00:41:02 +00:00
parent 22647a0783
commit 7400a858be
2 changed files with 6 additions and 4 deletions

View File

@ -125,8 +125,9 @@ class Module(LLVMObject):
def print_module_to_file(self, filename):
out = c_char_p(None)
result = lib.LLVMPrintModuleToFile(self, filename, byref(out))
if not result:
# Result is inverted so 0 means everything was ok.
result = lib.LLVMPrintModuleToFile(self, filename, byref(out))
if result:
raise RuntimeError("LLVM Error: %s" % out.value)
class Context(LLVMObject):