[llvm-commits] [llvm] r71783 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Dale Johannesen dalej at apple.com
Thu May 14 11:52:00 PDT 2009


On May 14, 2009, at 11:45 AMPDT, Eli Friedman wrote:

> On Thu, May 14, 2009 at 11:41 AM, Dale Johannesen <dalej at apple.com>  
> wrote:
>> +        Value *V2 = I->getOperand(0)->getUnderlyingObject();
>> +        if (V2) {
>> +          GlobalVariable* GV = dyn_cast<GlobalVariable>(V2);
>> +          if (GV && GV->hasExternalWeakLinkage())
>> +            return false;
>> +        }
>
> Ah, hmm, I'm not sure how I missed this when I looked at it
> originally, but it's unsafe to continue if V2 or GV is null.  In those
> cases, you have no clue what the pointer points at.

A variable base you mean?  That wouldn't be a Constant, would it?  Can  
you give an example that would break?




More information about the llvm-commits mailing list