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
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 63f4349..20900c2 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1175,7 +1175,10 @@
std::vector<char> PredefineBuffer;
unsigned MainFileID = InitializePreprocessor(PP, InFile, PredefineBuffer);
- if (!MainFileID) continue;
+ if (!MainFileID)
+ continue;
+
+ SourceMgr.setMainFileID(MainFileID);
ProcessInputFile(PP, MainFileID, InFile, *DiagClient);