Collapse the original file name and original file ID records into a
single record.
llvm-svn: 166206
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 019e7c1..20fa279 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -1860,24 +1860,17 @@
break;
}
- case ORIGINAL_FILE_NAME:
+ case ORIGINAL_FILE:
// Only record from the primary AST file.
if (&F == *ModuleMgr.begin()) {
- // The primary AST will be the last to get here, so it will be the one
- // that's used.
+ OriginalFileID = FileID::get(Record[0]);
+
ActualOriginalFileName.assign(BlobStart, BlobLen);
OriginalFileName = ActualOriginalFileName;
MaybeAddSystemRootToFilename(OriginalFileName);
}
break;
- case ORIGINAL_FILE_ID:
- // Only record from the primary AST file.
- if (&F == *ModuleMgr.begin()) {
- OriginalFileID = FileID::get(Record[0]);
- }
- break;
-
case ORIGINAL_PCH_DIR:
// Only record from the primary AST file.
if (&F == *ModuleMgr.begin()) {
@@ -3323,8 +3316,7 @@
Record.clear();
const char *BlobStart = 0;
unsigned BlobLen = 0;
- if (Stream.ReadRecord(Code, Record, &BlobStart, &BlobLen)
- == ORIGINAL_FILE_NAME)
+ if (Stream.ReadRecord(Code, Record, &BlobStart, &BlobLen) == ORIGINAL_FILE)
return std::string(BlobStart, BlobLen);
}