diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-05 21:55:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-05 21:55:30 +0000 |
commit | 72172e900992a8b184571745eb7bf62af62a8c6d (patch) | |
tree | 0274cfb8c2a5576300ff8242525185bfeac7e20e /clang/lib/AST/DeclFriend.cpp | |
parent | 9ed5b49c45ba377cffbc5d0d893b5437f50228af (diff) | |
download | bcm5719-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.cpp | 5 |
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()); } |