forked from OSchip/llvm-project
simplify this check, GetConstantStringInfo validates that a
global is constant already. No functionality change. llvm-svn: 52812
This commit is contained in:
parent
501c0b82d6
commit
735705bc3e
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue