diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-12-19 22:29:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-12-19 22:29:55 +0000 |
commit | 76edd0e4ae0592a7225d50d0bad6732ac64dca2a (patch) | |
tree | fb2e1e5d0249c05d9419fabc6e5a51820bdebc4b /Basic/SourceManager.cpp | |
parent | 94a5c3334bba3cc8cd1da85ba1118bc2c080add9 (diff) |
Added storage of the FileID of the the main source file of a translation unit
in SourceManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45225 91177308-0d34-0410-b5e6-96231b3b80d8
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. |