From fa54bc2052d4f1aa3fdb57a5238e73d4a62826a3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 13 Mar 2009 04:39:26 +0000 Subject: Oops...I committed too much. llvm-svn: 66867 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4afc3b5c3ec..71560fe2ae6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2931,11 +2931,8 @@ static bool isMemSrcFromString(SDValue Src, std::string &Str) { return false; GlobalVariable *GV = dyn_cast(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; } -- cgit v1.2.3