Make note about preverifier bug in LLVM that *.verify() will abort upon error
This commit is contained in:
parent
31fbc3ae64
commit
207254fe50
1 changed files with 5 additions and 0 deletions
|
|
@ -522,6 +522,8 @@ class Module(llvm.Ownable, llvm.Cacheable):
|
||||||
Checks module for errors. Raises `llvm.LLVMException' on any
|
Checks module for errors. Raises `llvm.LLVMException' on any
|
||||||
error."""
|
error."""
|
||||||
ret = _core.LLVMVerifyModule(self.ptr)
|
ret = _core.LLVMVerifyModule(self.ptr)
|
||||||
|
# Note: LLVM has a bug in preverifier that will always abort
|
||||||
|
# the process upon failure.
|
||||||
if ret != "":
|
if ret != "":
|
||||||
raise llvm.LLVMException(ret)
|
raise llvm.LLVMException(ret)
|
||||||
|
|
||||||
|
|
@ -1508,6 +1510,9 @@ class Function(GlobalValue):
|
||||||
def verify(self):
|
def verify(self):
|
||||||
# Although we're just asking LLVM to return the success or
|
# Although we're just asking LLVM to return the success or
|
||||||
# failure, it appears to print result to stderr and abort.
|
# failure, it appears to print result to stderr and abort.
|
||||||
|
|
||||||
|
# Note: LLVM has a bug in preverifier that will always abort
|
||||||
|
# the process upon failure.
|
||||||
return _core.LLVMVerifyFunction(self.ptr) != 0
|
return _core.LLVMVerifyFunction(self.ptr) != 0
|
||||||
|
|
||||||
#===----------------------------------------------------------------------===
|
#===----------------------------------------------------------------------===
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue