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/Frontend/PCHReaderDecl.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/Frontend/PCHReaderDecl.cpp')
-rw-r--r-- | lib/Frontend/PCHReaderDecl.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 120596ba82..2bdf1662d5 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -1145,11 +1145,10 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) { D = TypedefDecl::Create(*Context, 0, SourceLocation(), 0, 0); break; case pch::DECL_ENUM: - D = EnumDecl::Create(*Context, 0, SourceLocation(), 0, SourceLocation(), 0); + D = EnumDecl::Create(*Context, Decl::EmptyShell()); break; case pch::DECL_RECORD: - D = RecordDecl::Create(*Context, TTK_Struct, 0, SourceLocation(), - 0, SourceLocation(), 0); + D = RecordDecl::Create(*Context, Decl::EmptyShell()); break; case pch::DECL_ENUM_CONSTANT: D = EnumConstantDecl::Create(*Context, 0, SourceLocation(), 0, QualType(), @@ -1196,8 +1195,7 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) { DeclarationName()); break; case pch::DECL_CXX_RECORD: - D = CXXRecordDecl::Create(*Context, TTK_Struct, 0, - SourceLocation(), 0, SourceLocation(), 0); + D = CXXRecordDecl::Create(*Context, Decl::EmptyShell()); break; case pch::DECL_CXX_METHOD: D = CXXMethodDecl::Create(*Context, 0, SourceLocation(), DeclarationName(), @@ -1227,17 +1225,18 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) { DeclarationName(), 0, 0, 0); break; case pch::DECL_CLASS_TEMPLATE_SPECIALIZATION: - D = ClassTemplateSpecializationDecl::CreateEmpty(*Context); + D = ClassTemplateSpecializationDecl::Create(*Context, Decl::EmptyShell()); break; case pch::DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION: - D = ClassTemplatePartialSpecializationDecl::CreateEmpty(*Context); + D = ClassTemplatePartialSpecializationDecl::Create(*Context, + Decl::EmptyShell()); break; case pch::DECL_FUNCTION_TEMPLATE: D = FunctionTemplateDecl::Create(*Context, 0, SourceLocation(), DeclarationName(), 0, 0); break; case pch::DECL_TEMPLATE_TYPE_PARM: - D = TemplateTypeParmDecl::Create(*Context, 0, SourceLocation(), 0,0,0,0,0); + D = TemplateTypeParmDecl::Create(*Context, Decl::EmptyShell()); break; case pch::DECL_NON_TYPE_TEMPLATE_PARM: D = NonTypeTemplateParmDecl::Create(*Context, 0, SourceLocation(), 0,0,0, |