forked from OSchip/llvm-project
[PCH] Fix serialization of an ImportDecl.
ImportDecl's module ID was not written out and the reader accepted as module ID the serialized: Record.push_back(!IdentifierLocs.empty()); llvm-svn: 165087
This commit is contained in:
parent
aedf7144d1
commit
7b8e555814
|
@ -1246,6 +1246,7 @@ void ASTDeclReader::VisitImportDecl(ImportDecl *D) {
|
|||
SourceLocation *StoredLocs = reinterpret_cast<SourceLocation *>(D + 1);
|
||||
for (unsigned I = 0, N = Record.back(); I != N; ++I)
|
||||
StoredLocs[I] = ReadSourceLocation(Record, Idx);
|
||||
++Idx; // The number of stored source locations.
|
||||
}
|
||||
|
||||
void ASTDeclReader::VisitAccessSpecDecl(AccessSpecDecl *D) {
|
||||
|
|
|
@ -984,6 +984,7 @@ void ASTDeclWriter::VisitCXXConversionDecl(CXXConversionDecl *D) {
|
|||
|
||||
void ASTDeclWriter::VisitImportDecl(ImportDecl *D) {
|
||||
VisitDecl(D);
|
||||
Record.push_back(Writer.getSubmoduleID(D->getImportedModule()));
|
||||
ArrayRef<SourceLocation> IdentifierLocs = D->getIdentifierLocs();
|
||||
Record.push_back(!IdentifierLocs.empty());
|
||||
if (IdentifierLocs.empty()) {
|
||||
|
|
Loading…
Reference in New Issue