Added a parameter to control whether Constant::getStringValue() would chop
off the result string at the first null terminator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26704 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 96694da..f1afeb9 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1941,7 +1941,7 @@
         if (G) {
           GlobalVariable *GV = dyn_cast<GlobalVariable>(G->getGlobal());
           if (GV) {
-            Str = GV->getStringValue();
+            Str = GV->getStringValue(false);
             if (!Str.empty()) {
               CopyFromStr = true;
               SrcOff += SrcDelta;