aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-03-13 04:39:26 +0000
committerBill Wendling <isanbard@gmail.com>2009-03-13 04:39:26 +0000
commit0582ae99ba75a556d6ff63b254da327d32ba036f (patch)
treef6acdc868987413752d785dabab58cbb8e72e6b1 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentc7a09ab3110b9462ad9646cb60c22c8527491ad9 (diff)
Oops...I committed too much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 4afc3b5c3e..71560fe2ae 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2931,11 +2931,8 @@ static bool isMemSrcFromString(SDValue Src, std::string &Str) {
return false;
GlobalVariable *GV = dyn_cast<GlobalVariable>(G->getGlobal());
- if (GV) {
- const char *SI = GetConstantStringInfo(GV, SrcDelta, false);
- Str = (SI ? SI : "");
- if (!Str.empty()) return true;
- }
+ if (GV && GetConstantStringInfo(GV, Str, SrcDelta, false))
+ return true;
return false;
}