summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRTTI.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-02-05 02:30:40 +0000
committerChris Lattner <sabre@nondot.org>2012-02-05 02:30:40 +0000
commit94010695f7fce626e41ef045b60def9c912e9ce8 (patch)
treed37f138171025877b562c0f09e89e49bee81ebc2 /lib/CodeGen/CGRTTI.cpp
parentf7ccbad5d9949e7ddd1cbef43d482553b811e026 (diff)
downloadclang-94010695f7fce626e41ef045b60def9c912e9ce8.tar.gz
clang-94010695f7fce626e41ef045b60def9c912e9ce8.tar.bz2
clang-94010695f7fce626e41ef045b60def9c912e9ce8.tar.xz
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
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r--lib/CodeGen/CGRTTI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 14134930f2..20918920c1 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/lib/CodeGen/CGRTTI.cpp
@@ -125,7 +125,8 @@ RTTIBuilder::GetAddrOfTypeName(QualType Ty,
// 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);