aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-06 19:55:15 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-06 19:55:15 +0000
commit6e94ef5696cfb005d3fc7bbac8dcf7690b64f0a5 (patch)
tree97de005ec3d70e33d4173910446a126dd9a2211a /lib/Sema/SemaExprObjC.cpp
parent2770105f9ecdc1bf8ba0bc9ed1963eeabc10377d (diff)
Move StringLiteral to allocate its internal string data using the allocator in
ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 983231ccf4..003e121f37 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -40,9 +40,9 @@ Sema::ExprResult Sema::ParseObjCStringLiteral(SourceLocation *AtLocs,
p += S->getByteLength();
delete S;
}
- S = new StringLiteral(strBuf, Length,
- isWide, Context.getPointerType(Context.CharTy),
- AtLoc, EndLoc);
+ S = new (Context, 8) StringLiteral(Context, strBuf, Length, isWide,
+ Context.getPointerType(Context.CharTy),
+ AtLoc, EndLoc);
}
if (CheckBuiltinCFStringArgument(S))