Removed serialization of FileEntry and DirectoryEntry. This objects will

now be lazily recreated upon deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2007-12-04 22:42:20 +00:00
Родитель ceee3e8347
Коммит 8fbc88e5fa
2 изменённых файлов: 2 добавлений и 46 удалений

Просмотреть файл

@ -1,4 +1,4 @@
//===--- FileManager.cpp - File System Probing and Caching ----------------===//
///===--- FileManager.cpp - File System Probing and Caching ----------------===//
//
// The LLVM Compiler Infrastructure
//
@ -172,34 +172,3 @@ void FileManager::PrintStats() const {
//std::cerr << PagesMapped << BytesOfPagesMapped << FSLookups;
}
//===----------------------------------------------------------------------===//
// Serialization.
//===----------------------------------------------------------------------===//
void DirectoryEntry::Emit(llvm::Serializer& S) const {
S.EmitCStr(Name);
}
void DirectoryEntry::Read(llvm::Deserializer& D) {
Name = D.ReadCStr();
}
void FileEntry::Emit(llvm::Serializer& S) const {
S.FlushRecord();
S.EmitInt(Size);
S.EmitInt(ModTime);
S.EmitInt(UID);
S.EmitPtr(Dir);
S.EmitCStr(Name);
}
void FileEntry::Read(llvm::Deserializer& D) {
Size = (off_t) D.ReadInt();
ModTime = (time_t) D.ReadInt();
D.ReadPtr<DirectoryEntry>(const_cast<DirectoryEntry*&>(Dir));
Name = D.ReadCStr();
}

Просмотреть файл

@ -31,13 +31,7 @@ class DirectoryEntry {
friend class FileManager;
public:
DirectoryEntry() : Name(0) {}
const char *getName() const { return Name; }
/// Emit - Emit this DirectoryEntry to Bitcode.
void Emit(llvm::Serializer& S) const;
/// Create - Reconsitute a DirectoryEntry object from Bitcode.
void Read(llvm::Deserializer& D);
const char *getName() const { return Name; }
};
/// FileEntry - Cached information about one file on the disk.
@ -60,13 +54,6 @@ public:
/// getDir - Return the directory the file lives in.
///
const DirectoryEntry *getDir() const { return Dir; }
/// Emit - Emit this FileEntry to Bitcode.
void Emit(llvm::Serializer& S) const;
/// Read - Reconsitute a FileEntry object from Bitcode.
void Read(llvm::Deserializer& D);
};