9 #ifndef LLVM_CLANG_INDEXSERIALIZATION_SERIALIZABLEPATHCOLLECTION_H
10 #define LLVM_CLANG_INDEXSERIALIZATION_SERIALIZABLEPATHCOLLECTION_H
13 #include "llvm/ADT/APInt.h"
14 #include "llvm/ADT/DenseMap.h"
15 #include "llvm/ADT/SmallString.h"
16 #include "llvm/ADT/StringMap.h"
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/ADT/iterator.h"
38 StringOffsetSize
add(StringRef Str);
81 std::vector<FilePath> FilePaths;
90 llvm::DenseMap<const clang::FileEntry *, std::size_t> UniqueFiles;
91 llvm::StringMap<PathPool::DirPath, llvm::BumpPtrAllocator> UniqueDirs;
99 llvm::StringRef SysRoot,
100 llvm::StringRef OutputFile);
108 return Paths.getFilePaths();
Defines the clang::FileManager interface and associated types.
A reference to a FileEntry that includes the name of the file as it was accessed by the FileManager's...
Pool of filesystem paths backed by a StringPool.
size_t addFilePath(RootDirKind Root, const StringPool::StringOffsetSize &Dir, StringRef Filename)
StringPool::StringOffsetSize addDirPath(StringRef Dir)
StringRef getPaths() const
llvm::ArrayRef< FilePath > getFilePaths() const
RootDirKind
Special root directory of a filesystem path.
Stores file paths and produces serialization-friendly representation.
size_t tryStoreFilePath(FileEntryRef FE)
Stores path to FE if it hasn't been stored yet.
const StringPool::StringOffsetSize OutputFilePath
SerializablePathCollection(llvm::StringRef CurrentWorkDir, llvm::StringRef SysRoot, llvm::StringRef OutputFile)
ArrayRef< PathPool::FilePath > getFilePaths() const
llvm::StringRef getPathsBuffer() const
const StringPool::StringOffsetSize WorkDirPath
const StringPool::StringOffsetSize SysRootPath
StringOffsetSize add(StringRef Str)
StringRef getBuffer() const
The JSON file list parser is used to communicate input to InstallAPI.
DirPath(RootDirKind Root, const StringPool::StringOffsetSize &Path)
StringPool::StringOffsetSize Path
StringPool::StringOffsetSize Filename
FilePath(const DirPath &Dir, const StringPool::StringOffsetSize &Filename)
StringOffsetSize(size_t Offset, size_t Size)