[llvm-commits] [llvm] r93977 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/AsmWriter.cpp lib/VMCore/Metadata.cpp

Chandler Carruth chandlerc at google.com
Tue Jan 19 22:26:28 PST 2010


On Tue, Jan 19, 2010 at 10:23 PM, Victor Hernandez <vhernandez at apple.com> wrote:
>
> On Jan 19, 2010, at 10:01 PM, Chandler Carruth wrote:
>
>> On Tue, Jan 19, 2010 at 9:55 PM, Chandler Carruth <chandlerc at google.com> wrote:
>>> On Tue, Jan 19, 2010 at 8:45 PM, Victor Hernandez <vhernandez at apple.com> wrote:
>>>> +    if (Value *V = getOperand(i)) {
>>>> +      if (MDNode *MD = dyn_cast<MDNode>(V))
>>>> +        if (const Function *F = MD->getFunction()) return F;
>>>> +      else
>>>> +        return getFunctionForValue(V);
>>>
>>> This else is wrong. Worse, the test actually fails if you add braces
>>> to cause the behavior to follow the indentation.
>>
>> FYI, I fixed the ambiguity in r93980 to be more clear but have the
>> same behavior. Please review that it's still correct.
>
> Thanks for catching my bug, Chandler.  The original indentation was what was intended; getFunctionForValue() is for non-metadata values.
>
> I fixed this in r93984.

Cool. No idea why a test failed for me when I tried it, it works at
this revision so all is well. =D

>
> Victor
>
>




More information about the llvm-commits mailing list