[llvm-commits] [dragonegg] r150175 - /dragonegg/trunk/include/dragonegg/Internals.h

Duncan Sands baldrick at free.fr
Thu Feb 9 08:22:23 PST 2012


Hi David, it is needed:

>> --- dragonegg/trunk/include/dragonegg/Internals.h (original)
>> +++ dragonegg/trunk/include/dragonegg/Internals.h Thu Feb  9 08:30:58 2012
>> @@ -109,8 +109,8 @@
>>   /// DieAbjectly - An unrecoverable fatal error occurred - throw in the towel,
>>   /// give up the ghost, quit miserably.
>>   inline void LLVM_ATTRIBUTE_NORETURN DieAbjectly(const char *Message) {
>> -  llvm_unreachable(Message);
>>    (void)Message; // Avoid unused variable warning when assertions are disabled.
>
> does this actually need to be here at all? I didn't think
> llvm_unreachable compiled down to nothing when assertions are
> disabled...

#elif defined(LLVM_BUILTIN_UNREACHABLE)
#define llvm_unreachable(msg) LLVM_BUILTIN_UNREACHABLE

^ no use of msg in this case.

That said, maybe there should be a (void)msg in this definition of
llvm_unreachable just to suppress this kind of warning.

Ciao, Duncan.



More information about the llvm-commits mailing list