simplify this check, GetConstantStringInfo validates that a

global is constant already.  No functionality change.

llvm-svn: 52812
This commit is contained in:
Chris Lattner 2008-06-27 03:18:41 +00:00
parent 501c0b82d6
commit 735705bc3e
1 changed files with 3 additions and 5 deletions

View File

@ -2594,11 +2594,9 @@ static bool isMemSrcFromString(SDOperand Src, std::string &Str,
return false; return false;
GlobalVariable *GV = dyn_cast<GlobalVariable>(G->getGlobal()); GlobalVariable *GV = dyn_cast<GlobalVariable>(G->getGlobal());
if (GV && GV->isConstant()) { if (GV && GetConstantStringInfo(GV, Str)) {
if (GetConstantStringInfo(GV, Str)) { SrcOff += SrcDelta;
SrcOff += SrcDelta; return true;
return true;
}
} }
return false; return false;