[llvm-commits] [llvm] r47633 - in /llvm/trunk: include/llvm/Instructions.h lib/AsmParser/llvmAsmParser.y lib/VMCore/Instructions.cpp

Chris Lattner clattner at apple.com
Tue Feb 26 14:38:48 PST 2008


On Feb 26, 2008, at 2:34 PM, Devang Patel wrote:

>
> On Feb 26, 2008, at 2:27 PM, Chris Lattner wrote:
>
>> On Feb 26, 2008, at 2:12 PM, Devang Patel wrote:
>>> URL: http://llvm.org/viewvc/llvm-project?rev=47633&view=rev
>>> Log:
>>> Remove unncessary ReturnInst constructors.
>>> BBTerminatorInst :
>>> RET ReturnedVal  { // Return with a result...
>>> -    $$ = new ReturnInst(*$2);
>>> +    ValueList &VL = *$2;
>>> +    if (!VL.empty())
>>> +      $$ = new ReturnInst(&VL[0], VL.size());
>>
>> This needs to create a return for ret void!  This could not have
>> passed make check.
>
>
> we have
>
>   | RET VOID {                                    // Return with no
> result...
>     $$ = new ReturnInst();
>     CHECK_FOR_ERROR
>   }

Ahh, so the "if (!VL.empty())" check is dead?  Sorry for the alarm!

-Chris



More information about the llvm-commits mailing list