summaryrefslogtreecommitdiffstats
path: root/clang/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
commit72172e900992a8b184571745eb7bf62af62a8c6d (patch)
tree0274cfb8c2a5576300ff8242525185bfeac7e20e /clang/lib/AST/DeclFriend.cpp
parent9ed5b49c45ba377cffbc5d0d893b5437f50228af (diff)
downloadbcm5719-llvm-72172e900992a8b184571745eb7bf62af62a8c6d.tar.gz
bcm5719-llvm-72172e900992a8b184571745eb7bf62af62a8c6d.zip
When creating declarations that are deserialized from an module file,
go through a central allocation routine Decl::AllocateDeserializedDecl(). No actual functionality change (yet). llvm-svn: 147614
Diffstat (limited to 'clang/lib/AST/DeclFriend.cpp')
-rw-r--r--clang/lib/AST/DeclFriend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclFriend.cpp b/clang/lib/AST/DeclFriend.cpp
index e44333effae..6e3bd8d4225 100644
--- a/clang/lib/AST/DeclFriend.cpp
+++ b/clang/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());
}
OpenPOWER on IntegriCloud