diff options
| author | Chris Lattner <sabre@nondot.org> | 2012-01-31 06:13:55 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2012-01-31 06:13:55 +0000 |
| commit | f4a4bec3a0f3c0daa8dc4dcb7295855c104a3830 (patch) | |
| tree | 6cdbdc63de5a47825b6dfe84e38c2a6b30a3db43 /clang/lib/CodeGen/CGExprConstant.cpp | |
| parent | 8ea967d0502a685a489bc34787044da8d91ac152 (diff) | |
| download | bcm5719-llvm-f4a4bec3a0f3c0daa8dc4dcb7295855c104a3830.tar.gz bcm5719-llvm-f4a4bec3a0f3c0daa8dc4dcb7295855c104a3830.zip | |
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: 149363
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 d95a37c5843..aa21bd37bdd 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::ConstantArray::get(VMContext, Str, false); + return llvm::ConstantDataArray::getString(VMContext, Str, false); } llvm::Constant *VisitUnaryExtension(const UnaryOperator *E) { |

