From 07c68f9b6f2d1009f8c239c27e351fd8246879f5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 27 Jun 2008 03:18:41 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 9c5997df45d..65d2d6ba380 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(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; -- 2.34.1