diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-27 03:18:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-27 03:18:41 +0000 |
commit | 735705bc3e26ab23286db0ab00c9ba0e3fd5d734 (patch) | |
tree | a8b87f73ae96c8b514aa9a5a22daa96c15ea040d | |
parent | 501c0b82d676434db2a0d080bc79bc7c711775e6 (diff) | |
download | bcm5719-llvm-735705bc3e26ab23286db0ab00c9ba0e3fd5d734.tar.gz bcm5719-llvm-735705bc3e26ab23286db0ab00c9ba0e3fd5d734.zip |
simplify this check, GetConstantStringInfo validates that a
global is constant already. No functionality change.
llvm-svn: 52812
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 9c5997df45d..65d2d6ba380 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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; |