Fix thinko

llvm-svn: 11027
This commit is contained in:
Chris Lattner 2004-01-30 22:48:02 +00:00
parent f5b5d1f2f8
commit a497e3d6e1

View File

@ -130,9 +130,9 @@ static const Value *GetGEPOperands(const Value *V, std::vector<Value*> &GEPOps){
/// pointsToConstantMemory - Chase pointers until we find a (constant
/// global) or not.
bool BasicAliasAnalysis::pointsToConstantMemory(const Value *P) {
const Value *V = getUnderlyingObject(P);
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
return GV->isConstant();
if (const Value *V = getUnderlyingObject(P))
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
return GV->isConstant();
return false;
}