[llvm-commits] Error-handling fixes for the x86 disassembler

Sean Callanan scallanan at apple.com
Wed Mar 31 15:42:16 PDT 2010


The attached patch fixes error handling for the x86 disassembler, eliminating llvm_unreachable() and assert() in favor of using the legitimate error-handling mechanism.  The rationale is to allow clients of libEnhancedDisassembly to handle errors themselves, rather than forcing them to crash.

The difference is that now assert() and llvm_unreachable() will never be called (even before, this was extremely unlikely), and the proper error-handling mechanism is used instead.  Further diagnostic information is printed to stderr.

Please let me know what you think.

Sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86-disassembler-assert.diff
Type: application/octet-stream
Size: 15218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100331/af69a5bd/attachment.obj>


More information about the llvm-commits mailing list