[llvm-commits] [llvm] r52149 - in /llvm/trunk: lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y lib/AsmParser/llvmAsmParser.y.cvs utils/llvm.grm

Chris Lattner clattner at apple.com
Mon Jun 23 22:10:58 PDT 2008


On Jun 23, 2008, at 11:43 AM, Dan Gohman wrote:

>>
>>
>>> +  | '[' ']' {
>>> +    $$ = ValID::createUndef();
>>> +    CHECK_FOR_ERROR
>>> +  }
>>
>> This should make an empty array not an undef.  I'm not sure if it  
>> make
>> a difference in practice though.
>
> The problem is that this bit of code doesn't know the element type.
> ValID::createUndef lets the array type be inferred later. I judged it
> not important enough to justify a significantly more elaborate
> solution. I added a comment to explain it now.
>
>

Ah cute.  Excellent, thanks Dan!

-Chris



More information about the llvm-commits mailing list