diff options
Diffstat (limited to 'clang/AST')
-rw-r--r-- | clang/AST/Decl.cpp | 9 | ||||
-rw-r--r-- | clang/AST/DeclSerialization.cpp | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp index a171589f135..8487efb8449 100644 --- a/clang/AST/Decl.cpp +++ b/clang/AST/Decl.cpp @@ -227,6 +227,15 @@ ParmVarDecl *ParmVarDecl::Create(SourceLocation L, IdentifierInfo *Id, return new (Mem) ParmVarDecl(L, Id, T, S, PrevDecl); } +FunctionDecl *FunctionDecl::Create(ASTContext &C, SourceLocation L, + IdentifierInfo *Id, QualType T, + StorageClass S, bool isInline, + ScopedDecl *PrevDecl) { + void *Mem = C.getAllocator().Allocate<FunctionDecl>(); + return new (Mem) FunctionDecl(L, Id, T, S, isInline, PrevDecl); +} + + EnumConstantDecl *EnumConstantDecl::Create(SourceLocation L, IdentifierInfo *Id, QualType T, Expr *E, const llvm::APSInt &V, diff --git a/clang/AST/DeclSerialization.cpp b/clang/AST/DeclSerialization.cpp index 26b36c2994d..a7eaed5b2ef 100644 --- a/clang/AST/DeclSerialization.cpp +++ b/clang/AST/DeclSerialization.cpp @@ -338,7 +338,7 @@ FunctionDecl* FunctionDecl::CreateImpl(Deserializer& D) { bool IsInline = D.ReadBool(); FunctionDecl* decl = - new FunctionDecl(SourceLocation(),NULL,QualType(),SClass,IsInline); + new FunctionDecl(SourceLocation(),NULL,QualType(),SClass, IsInline, 0); decl->ValueDecl::ReadInRec(D); D.ReadPtr(decl->DeclChain); |