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 | 07c68f9b6f2d1009f8c239c27e351fd8246879f5 (patch) | |
tree | cc978df591dcabcfb57ee5e9aa310d9e2f995fe8 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | bd2acd736d9c59d814f0e30db6cde53df2ac004c (diff) |
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 9c5997df45..65d2d6ba38 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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; |