r209557 - Recompute the injected class name type for a class template specialization
Richard Smith
richard-llvm at metafoo.co.uk
Fri May 23 14:31:59 PDT 2014
Author: rsmith
Date: Fri May 23 16:31:59 2014
New Revision: 209557
URL: http://llvm.org/viewvc/llvm-project?rev=209557&view=rev
Log:
Recompute the injected class name type for a class template specialization
rather than saving and restoring it.
Modified:
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=209557&r1=209556&r2=209557&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Fri May 23 16:31:59 2014
@@ -1646,8 +1646,6 @@ void ASTDeclReader::VisitClassTemplateDe
memcpy(CommonPtr->LazySpecializations, SpecIDs.data(),
SpecIDs.size() * sizeof(DeclID));
}
-
- CommonPtr->InjectedClassNameType = Reader.readType(F, Record, Idx);
}
if (D->getTemplatedDecl()->TemplateOrInstantiation) {
@@ -1655,7 +1653,7 @@ void ASTDeclReader::VisitClassTemplateDe
// its corresponding type yet (see VisitCXXRecordDeclImpl), so reconstruct
// it now.
Reader.Context.getInjectedClassNameType(
- D->getTemplatedDecl(), D->getCommonPtr()->InjectedClassNameType);
+ D->getTemplatedDecl(), D->getInjectedClassNameSpecialization());
}
}
Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=209557&r1=209556&r2=209557&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Fri May 23 16:31:59 2014
@@ -1156,8 +1156,6 @@ void ASTDeclWriter::VisitClassTemplateDe
assert(I->isCanonicalDecl() && "Expected only canonical decls in set");
Writer.AddDeclRef(&*I, Record);
}
-
- Writer.AddTypeRef(D->getCommonPtr()->InjectedClassNameType, Record);
}
Code = serialization::DECL_CLASS_TEMPLATE;
}
More information about the cfe-commits
mailing list