aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclFriend.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-05 21:55:30 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-05 21:55:30 +0000
commit1e68ecc4fcce12f683c4fd38acfd1a004001b04f (patch)
treefd87a549e1751f907c6ae4355553f2c51bdce0cb /lib/AST/DeclFriend.cpp
parentb8c879a5363f36bdae8831112b563333e3c05acb (diff)
When creating declarations that are deserialized from an module file,
go through a central allocation routine Decl::AllocateDeserializedDecl(). No actual functionality change (yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclFriend.cpp')
-rw-r--r--lib/AST/DeclFriend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/DeclFriend.cpp b/lib/AST/DeclFriend.cpp
index e44333effa..6e3bd8d422 100644
--- a/lib/AST/DeclFriend.cpp
+++ b/lib/AST/DeclFriend.cpp
@@ -42,6 +42,7 @@ FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC,
return FD;
}
-FriendDecl *FriendDecl::Create(ASTContext &C, EmptyShell Empty) {
- return new (C) FriendDecl(Empty);
+FriendDecl *FriendDecl::CreateDeserialized(ASTContext &C, unsigned ID) {
+ void *Mem = AllocateDeserializedDecl(C, ID, sizeof(FriendDecl));
+ return new (Mem) FriendDecl(EmptyShell());
}