summaryrefslogtreecommitdiffstats
path: root/clang/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/AST/Decl.cpp')
-rw-r--r--clang/AST/Decl.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp
index aad8f212bfe..a171589f135 100644
--- a/clang/AST/Decl.cpp
+++ b/clang/AST/Decl.cpp
@@ -205,6 +205,28 @@ void Decl::addDeclKind(Kind k) {
// Decl Allocation/Deallocation Method Implementations
//===----------------------------------------------------------------------===//
+BlockVarDecl *BlockVarDecl::Create(SourceLocation L, IdentifierInfo *Id,
+ QualType T, StorageClass S,
+ ScopedDecl *PrevDecl, ASTContext &C) {
+ void *Mem = C.getAllocator().Allocate<BlockVarDecl>();
+ return new (Mem) BlockVarDecl(L, Id, T, S, PrevDecl);
+}
+
+
+FileVarDecl *FileVarDecl::Create(SourceLocation L, IdentifierInfo *Id,
+ QualType T, StorageClass S,
+ ScopedDecl *PrevDecl, ASTContext &C) {
+ void *Mem = C.getAllocator().Allocate<FileVarDecl>();
+ return new (Mem) FileVarDecl(L, Id, T, S, PrevDecl);
+}
+
+ParmVarDecl *ParmVarDecl::Create(SourceLocation L, IdentifierInfo *Id,
+ QualType T, StorageClass S,
+ ScopedDecl *PrevDecl, ASTContext &C) {
+ void *Mem = C.getAllocator().Allocate<ParmVarDecl>();
+ return new (Mem) ParmVarDecl(L, Id, T, S, PrevDecl);
+}
+
EnumConstantDecl *EnumConstantDecl::Create(SourceLocation L, IdentifierInfo *Id,
QualType T, Expr *E,
const llvm::APSInt &V,
OpenPOWER on IntegriCloud