diff options
Diffstat (limited to 'Basic/SourceManager.cpp')
-rw-r--r-- | Basic/SourceManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Basic/SourceManager.cpp b/Basic/SourceManager.cpp index d7039b3651..fe213426b9 100644 --- a/Basic/SourceManager.cpp +++ b/Basic/SourceManager.cpp @@ -508,6 +508,7 @@ MacroIDInfo MacroIDInfo::ReadVal(llvm::Deserializer& D) { void SourceManager::Emit(llvm::Serializer& S) const { S.EnterBlock(); S.EmitPtr(this); + S.EmitInt(MainFileID); // Emit: FileInfos. Just emit the file name. S.EnterBlock(); @@ -541,6 +542,9 @@ SourceManager::CreateAndRegister(llvm::Deserializer& D, FileManager& FMgr){ SourceManager *M = new SourceManager(); D.RegisterPtr(M); + // Read: the FileID of the main source file of the translation unit. + M->MainFileID = D.ReadInt(); + std::vector<char> Buf; { // Read: FileInfos. |