aboutsummaryrefslogtreecommitdiff
path: root/Driver/SerializationTest.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-19 19:27:38 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-19 19:27:38 +0000
commit63ea863d4715249551ab10ae207386ddc383419e (patch)
tree7f343cb2e78acee13fe71a9fad3ba9c3a9fc3a61 /Driver/SerializationTest.cpp
parent6f62c2abd8077bf70d2166d37e8caa426b34d8e4 (diff)
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
Diffstat (limited to 'Driver/SerializationTest.cpp')
-rw-r--r--Driver/SerializationTest.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Driver/SerializationTest.cpp b/Driver/SerializationTest.cpp
index 59b36e75a8..acb91642d3 100644
--- a/Driver/SerializationTest.cpp
+++ b/Driver/SerializationTest.cpp
@@ -37,8 +37,9 @@ class SerializationTest : public ASTConsumer {
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 @@ public:
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 @@ private:
} // 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);
}