Removed storing inode and device number in TranslationUnit.

Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45211 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/SerializationTest.cpp b/Driver/SerializationTest.cpp
index 59b36e7..acb9164 100644
--- a/Driver/SerializationTest.cpp
+++ b/Driver/SerializationTest.cpp
@@ -37,8 +37,9 @@
   Diagnostic &Diags;
   FileManager &FMgr;  
 public:  
-  SerializationTest(Diagnostic &d, FileManager& fmgr, const LangOptions& LOpts)
-                    : TU(LOpts), Diags(d), FMgr(fmgr) {}
+  SerializationTest(const std::string& SourceFile, Diagnostic &d,
+                    FileManager& fmgr, const LangOptions& LOpts)
+                    : TU(SourceFile, LOpts), Diags(d), FMgr(fmgr) {}
   
   ~SerializationTest();
 
@@ -49,6 +50,7 @@
   virtual void HandleTopLevelDecl(Decl *D) {
     TU.AddTopLevelDecl(D);
   }
+  
 private:
   bool Serialize(llvm::sys::Path& Filename, llvm::sys::Path& FNameDeclPrint);
   bool Deserialize(llvm::sys::Path& Filename, llvm::sys::Path& FNameDeclPrint);
@@ -57,9 +59,9 @@
 } // end anonymous namespace
 
 ASTConsumer*
-clang::CreateSerializationTest(Diagnostic &Diags, FileManager& FMgr,
-                               const LangOptions &LOpts) {  
-  return new SerializationTest(Diags,FMgr,LOpts);
+clang::CreateSerializationTest(const std::string& SourceFile, Diagnostic &Diags,
+                               FileManager& FMgr, const LangOptions &LOpts) {  
+  return new SerializationTest(SourceFile,Diags,FMgr,LOpts);
 }