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;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue