-//===--- FileManager.cpp - File System Probing and Caching ----------------===//
+///===--- FileManager.cpp - File System Probing and Caching ----------------===//
//
// The LLVM Compiler Infrastructure
//
//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();
-}
-
-
-
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.
/// 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);
};