[LLVMdev] [patch] Change llvm_unreachable to use __builtin_unreachable() in -asserts
Chris Lattner
clattner at apple.com
Mon Mar 14 13:00:20 PDT 2011
On Mar 11, 2011, at 6:54 PM, John McCall wrote:
> This patch implements the current consensus of PR8973:
> http://llvm.org/bugs/show_bug.cgi?id=8973.
>
> The macro llvm_unreachable is used in LLVM to indicate that
> a particular place in a function is not supposed to be reachable
> during execution. Like an assert macro, it takes a string
> argument. In +Asserts builds, this string argument, together with
> some location information, is passed to a function which prints
> the information and calls abort(). In -Asserts builds, this string
> argument is dropped (to minimize code size impact), and
> instead a bunch of zero arguments are passed to the same
> function.
Hi John,
The patch looks great to me!
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110314/c88c95b9/attachment.html>
More information about the llvm-dev
mailing list