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 | 1e68ecc4fcce12f683c4fd38acfd1a004001b04f (patch) | |
tree | fd87a549e1751f907c6ae4355553f2c51bdce0cb /lib/AST/DeclBase.cpp | |
parent | b8c879a5363f36bdae8831112b563333e3c05acb (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/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index d60edd06e9..55484188c8 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -41,6 +41,12 @@ using namespace clang; static bool StatSwitch = false; +void *Decl::AllocateDeserializedDecl(const ASTContext &Context, + unsigned ID, + unsigned Size) { + return Context.Allocate(Size); +} + const char *Decl::getDeclKindName() const { switch (DeclKind) { default: llvm_unreachable("Declaration not in DeclNodes.inc!"); |