[llvm-commits] [llvm] r62236 -/llvm/trunk/lib/VMCore/AsmWriter.cpp

Chris Lattner clattner at apple.com
Wed Jan 14 12:45:47 PST 2009


On Jan 14, 2009, at 12:17 PM, Nuno Lopes wrote:

>> On Jan 14, 2009, at 9:51 AM, Nuno Lopes wrote:
>>
>>> Author: nlopes
>>> Date: Wed Jan 14 11:51:41 2009
>>> New Revision: 62236
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=62236&view=rev
>>> Log:
>>> fix crash in the case when some arg is null
>>
>> Hi Nuno,
>>
>> When can operands be null?
>>
>> -Chris
>
> There are some passes that nullify the args when doing cleanups.  
> This check
> really helps when you're debuging and call dump(). This way it won't  
> crash
> the app.
> IMHO, it doesn't hurt much and helps when debugging (anyway the
> writeOperand() code does the same).

Ok.  Please add a comment indicating that this shouldn't happen, but  
helps make dump() more tolerant of malformed IR, thanks!

-Chris




More information about the llvm-commits mailing list