diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-01 06:36:49 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-01 06:36:49 +0000 |
commit | a11b35a9b0583946780aa2e774f775362db33fdd (patch) | |
tree | b7d3e05d45019521a97887e246e6e476bbdba30e /clang/lib/CodeGen/CGRTTI.cpp | |
parent | c3c9ee562368b5d686d21b6a702c89e69aae6a36 (diff) | |
download | bcm5719-llvm-a11b35a9b0583946780aa2e774f775362db33fdd.tar.gz bcm5719-llvm-a11b35a9b0583946780aa2e774f775362db33fdd.zip |
Revert r149363 which was part a series of commits that were reverted in llvm
commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c.
Original log:
ConstantArray::get() (for strings) is going away, use
ConstantDataArray::getString instead.
Many instances of ConstantArray::get() could be moved to
use more efficient ConstantDataArray methods that avoid a ton
of intermediate Constant*'s for each element (e.g.
GetConstantArrayFromStringLiteral). I don't plan on doing this
in the short-term though.
llvm-svn: 149477
Diffstat (limited to 'clang/lib/CodeGen/CGRTTI.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGRTTI.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGRTTI.cpp b/clang/lib/CodeGen/CGRTTI.cpp index a5883f61d62..120e711e840 100644 --- a/clang/lib/CodeGen/CGRTTI.cpp +++ b/clang/lib/CodeGen/CGRTTI.cpp @@ -125,8 +125,7 @@ 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::ConstantDataArray::getString(VMContext, - Name.substr(4)); + llvm::Constant *Init = llvm::ConstantArray::get(VMContext, Name.substr(4)); llvm::GlobalVariable *GV = CGM.CreateOrReplaceCXXRuntimeVariable(Name, Init->getType(), Linkage); |