#include "llvm/Support/FileCollector.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
usingnamespacellvm;
FileCollectorBase::FileCollectorBase() = default;
FileCollectorBase::~FileCollectorBase() = default;
void FileCollectorBase::addFile(const Twine &File) { … }
void FileCollectorBase::addDirectory(const Twine &Dir) { … }
static bool isCaseSensitivePath(StringRef Path) { … }
FileCollector::FileCollector(std::string Root, std::string OverlayRoot)
: … { … }
void FileCollector::PathCanonicalizer::updateWithRealPath(
SmallVectorImpl<char> &Path) { … }
static void makeAbsolute(SmallVectorImpl<char> &Path) { … }
FileCollector::PathCanonicalizer::PathStorage
FileCollector::PathCanonicalizer::canonicalize(StringRef SrcPath) { … }
void FileCollector::addFileImpl(StringRef SrcPath) { … }
llvm::vfs::directory_iterator
FileCollector::addDirectoryImpl(const llvm::Twine &Dir,
IntrusiveRefCntPtr<vfs::FileSystem> FS,
std::error_code &EC) { … }
static std::error_code
copyAccessAndModificationTime(StringRef Filename,
const sys::fs::file_status &Stat) { … }
std::error_code FileCollector::copyFiles(bool StopOnError) { … }
std::error_code FileCollector::writeMapping(StringRef MappingFile) { … }
namespace llvm {
class FileCollectorFileSystem : public vfs::FileSystem { … };
}
IntrusiveRefCntPtr<vfs::FileSystem>
FileCollector::createCollectorVFS(IntrusiveRefCntPtr<vfs::FileSystem> BaseFS,
std::shared_ptr<FileCollector> Collector) { … }