diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-02 11:54:55 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-02 11:54:55 +0000 |
commit | b8b03e6df1cc89e701a809c6a47c41f31b7a9e50 (patch) | |
tree | c01d1d60d72fce3c56b132fe0172e5e39278709c /lib/AST/Decl.cpp | |
parent | bed95e25b7baafd615b84eeb60458f641da842e5 (diff) |
Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 267c19f5dc..c3c30f9446 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1638,6 +1638,10 @@ EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, return Enum; } +EnumDecl *EnumDecl::Create(ASTContext &C, EmptyShell Empty) { + return new (C) EnumDecl(0, SourceLocation(), 0, 0, SourceLocation()); +} + void EnumDecl::Destroy(ASTContext& C) { TagDecl::Destroy(C); } @@ -1677,6 +1681,11 @@ RecordDecl *RecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC, return R; } +RecordDecl *RecordDecl::Create(ASTContext &C, EmptyShell Empty) { + return new (C) RecordDecl(Record, TTK_Struct, 0, SourceLocation(), 0, 0, + SourceLocation()); +} + RecordDecl::~RecordDecl() { } |