diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-09 15:13:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-09 15:13:55 +0000 |
commit | 3b8043b49aff6e5d70f29ef5684214ce2473763c (patch) | |
tree | 6e5de9a3e146bb39b7baad6d1aa1b8c14c9c6d37 /lib/Serialization/ASTReader.cpp | |
parent | e802c613f2a24153c5fcb2474b4c7c66b29153a8 (diff) |
Migrate the serialization of ASTContext's AutoDeduceTy and
AutoRRefDeductTy from the "special types" block to predefined
types. The latter behaves better when loading multiple AST files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 0482636fc0..9659f46f17 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3046,11 +3046,6 @@ void ASTReader::InitializeContext(ASTContext &Ctx) { if (SpecialTypes[SPECIAL_TYPE_INT128_INSTALLED]) Context->setInt128Installed(); - - if (unsigned AutoDeduct = SpecialTypes[SPECIAL_TYPE_AUTO_DEDUCT]) - Context->AutoDeductTy = GetType(AutoDeduct); - if (unsigned AutoRRefDeduct = SpecialTypes[SPECIAL_TYPE_AUTO_RREF_DEDUCT]) - Context->AutoRRefDeductTy = GetType(AutoRRefDeduct); } ReadPragmaDiagnosticMappings(Context->getDiagnostics()); @@ -4033,6 +4028,11 @@ QualType ASTReader::GetType(TypeID ID) { case PREDEF_TYPE_OBJC_ID: T = Context->ObjCBuiltinIdTy; break; case PREDEF_TYPE_OBJC_CLASS: T = Context->ObjCBuiltinClassTy; break; case PREDEF_TYPE_OBJC_SEL: T = Context->ObjCBuiltinSelTy; break; + case PREDEF_TYPE_AUTO_DEDUCT: T = Context->getAutoDeductType(); break; + + case PREDEF_TYPE_AUTO_RREF_DEDUCT: + T = Context->getAutoRRefDeductType(); + break; } assert(!T.isNull() && "Unknown predefined type"); |