Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/ASTStreamer.cpp b/Sema/ASTStreamer.cpp
index b51874c..b6b6300 100644
--- a/Sema/ASTStreamer.cpp
+++ b/Sema/ASTStreamer.cpp
@@ -25,9 +25,10 @@
   class ASTStreamer {
     Parser P;
   public:
-    ASTStreamer(Preprocessor &pp, ASTContext &ctxt, unsigned MainFileID)
+    ASTStreamer(Preprocessor &pp, ASTContext &ctxt)
       : P(pp, *new Sema(pp, ctxt)) {
-      pp.EnterMainSourceFile(MainFileID);
+        
+      pp.EnterMainSourceFile();
       
       // Initialize the parser.
       P.Initialize();
@@ -73,8 +74,7 @@
 /// ParseAST - Parse the entire file specified, notifying the ASTConsumer as
 /// the file is parsed.  This takes ownership of the ASTConsumer and
 /// ultimately deletes it.
-void clang::ParseAST(Preprocessor &PP, unsigned MainFileID, 
-                     ASTConsumer *Consumer, bool PrintStats) {
+void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats) {
   // Collect global stats on Decls/Stmts (until we have a module streamer).
   if (PrintStats) {
     Decl::CollectingStats(true);
@@ -84,9 +84,9 @@
   ASTContext Context(PP.getSourceManager(), PP.getTargetInfo(),
                      PP.getIdentifierTable(), PP.getSelectorTable());
   
-  ASTStreamer Streamer(PP, Context, MainFileID);
+  ASTStreamer Streamer(PP, Context);
   
-  Consumer->Initialize(Context, MainFileID);
+  Consumer->Initialize(Context);
   
   while (Decl *D = Streamer.ReadTopLevelDecl())
     Consumer->HandleTopLevelDecl(D);