[llvm-commits] [llvm] r71757 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Chris Lattner clattner at apple.com
Sun Jun 14 22:55:54 PDT 2009


On May 18, 2009, at 12:02 PM, Dan Gohman wrote:

>
> On May 13, 2009, at 6:38 PM, Chris Lattner wrote:
>
>>
>> On May 13, 2009, at 5:30 PM, Dan Gohman wrote:
>>
>>> Author: djg
>>> Date: Wed May 13 19:30:16 2009
>>> New Revision: 71757
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=71757&view=rev
>>> Log:
>>> Add an assert to turn a segfault on an unsupported inline
>>> asm construct into an assertion failure.
>>
>> Should this use printf+exit(1)?
>
>
> I don't know. I was just following similar code elsewhere in
> the same file. Is there a conscious decision to use printf+exit
> for certain cases now?

We should use printf+exit in the code generator for cases where user  
code written in C can trigger the problem.  assert should only be used  
for things we know cannot happen due to invariants in the code  
generator.  Using "exit" makes it easier to find these places in the  
future if we ever get a real error reporting mechanism.

-Chris



More information about the llvm-commits mailing list