[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:01:48 PST 2010


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.




More information about the llvm-commits mailing list