reapply the patches reverted in r149477, which enable ConstantDataArray.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149801 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 1413493..2091892 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/lib/CodeGen/CGRTTI.cpp
@@ -125,7 +125,8 @@
   // We know that the mangled name of the type starts at index 4 of the
   // mangled name of the typename, so we can just index into it in order to
   // get the mangled name of the type.
-  llvm::Constant *Init = llvm::ConstantArray::get(VMContext, Name.substr(4));
+  llvm::Constant *Init = llvm::ConstantDataArray::getString(VMContext,
+                                                            Name.substr(4));
 
   llvm::GlobalVariable *GV = 
     CGM.CreateOrReplaceCXXRuntimeVariable(Name, Init->getType(), Linkage);