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/CGExprConstant.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/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index aa21bd37bdd..d95a37c5843 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -811,7 +811,7 @@ public: // Resize the string to the right size, adding zeros at the end, or // truncating as needed. Str.resize(CAT->getSize().getZExtValue(), '\0'); - return llvm::ConstantDataArray::getString(VMContext, Str, false); + return llvm::ConstantArray::get(VMContext, Str, false); } llvm::Constant *VisitUnaryExtension(const UnaryOperator *E) { |