aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/StmtSerialization.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-18 06:40:38 +0000
committerChris Lattner <sabre@nondot.org>2009-02-18 06:40:38 +0000
commit2085fd6cd22ec5c268175251db10d7c60caf7aaa (patch)
tree117d3027fce1afe6b0a10f81be576c8119e0faf8 /lib/AST/StmtSerialization.cpp
parentc6666f8e9bbb7f31bf2e52f97137e738c4ca01d0 (diff)
privatize all of the string literal memory allocation/creation
stuff behind a private static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtSerialization.cpp')
-rw-r--r--lib/AST/StmtSerialization.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index 074969e9de..e1d85aa01c 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -971,8 +971,8 @@ StringLiteral* StringLiteral::CreateImpl(Deserializer& D, ASTContext& C) {
bool isWide = D.ReadBool();
unsigned ByteLength = D.ReadInt();
- StringLiteral* sl = new (C, llvm::alignof<StringLiteral>())
- StringLiteral(C, NULL, 0, isWide, t, SourceLocation());
+ StringLiteral* sl = StringLiteral::Create(C, NULL, 0, isWide, t,
+ SourceLocation());
char* StrData = new (C, llvm::alignof<char>()) char[ByteLength];
for (unsigned i = 0; i < ByteLength; ++i)