mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 00:17:32 +00:00
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:
parent
bd2acd736d
commit
07c68f9b6f
@ -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
Block a user