aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclBase.h
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 /include/clang/AST/DeclBase.h
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 'include/clang/AST/DeclBase.h')
-rw-r--r--include/clang/AST/DeclBase.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index ecd7762468..12f37e53e9 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -310,6 +310,18 @@ protected:
virtual ~Decl();
+ /// \brief Allocate memory for a deserialized declaration.
+ ///
+ /// This routine must be used to allocate memory for any declaration that is
+ /// deserialized from a module file.
+ ///
+ /// \param Context The context in which we will allocate memory.
+ /// \param ID The global ID of the deserialized declaration.
+ /// \param Size The size of the allocated object.
+ static void *AllocateDeserializedDecl(const ASTContext &Context,
+ unsigned ID,
+ unsigned Size);
+
public:
/// \brief Source range that this declaration covers.