simplify this check, GetConstantStringInfo validates that a

global is constant already.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52812 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-06-27 03:18:41 +00:00
parent bd2acd736d
commit 07c68f9b6f

View File

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