diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-19 14:40:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-19 14:40:25 +0000 |
commit | 0f45682b463773896c9e40ee1ed2b3e4ade1561e (patch) | |
tree | 8a82d2c920ce39ae306a6c245d534b95c0290eb9 /lib/Serialization/ASTReaderDecl.cpp | |
parent | 735ceaa4ccb60df5993245e645f7127bf4a4325f (diff) |
Combine common (de-)serialization logic for typedefs and type aliases
into operations on TypedefNameDecl. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 3bcafe9d59..d538d6ebb6 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -134,6 +134,7 @@ namespace clang { void VisitUsingDirectiveDecl(UsingDirectiveDecl *D); void VisitNamespaceAliasDecl(NamespaceAliasDecl *D); void VisitTypeDecl(TypeDecl *TD); + void VisitTypedefNameDecl(TypedefNameDecl *TD); void VisitTypedefDecl(TypedefDecl *TD); void VisitTypeAliasDecl(TypeAliasDecl *TD); void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D); @@ -307,16 +308,18 @@ void ASTDeclReader::VisitTypeDecl(TypeDecl *TD) { TypeIDForTypeDecl = Reader.getGlobalTypeID(F, Record[Idx++]); } -void ASTDeclReader::VisitTypedefDecl(TypedefDecl *TD) { +void ASTDeclReader::VisitTypedefNameDecl(TypedefNameDecl *TD) { VisitRedeclarable(TD); VisitTypeDecl(TD); - TD->setTypeSourceInfo(GetTypeSourceInfo(Record, Idx)); + TD->setTypeSourceInfo(GetTypeSourceInfo(Record, Idx)); +} + +void ASTDeclReader::VisitTypedefDecl(TypedefDecl *TD) { + VisitTypedefNameDecl(TD); } void ASTDeclReader::VisitTypeAliasDecl(TypeAliasDecl *TD) { - VisitRedeclarable(TD); - VisitTypeDecl(TD); - TD->setTypeSourceInfo(GetTypeSourceInfo(Record, Idx)); + VisitTypedefNameDecl(TD); } void ASTDeclReader::VisitTagDecl(TagDecl *TD) { |