std::string Dest = getDestPath(Src);
SmallString<128> Dir(Dest);
path::remove_filename(Dir);
- if (std::error_code EC = sys::fs::create_directories(Dir)) {
+ if (std::error_code EC = fs::create_directories(Dir)) {
error(EC, Dir + ": can't create directory");
return;
}
- if (std::error_code EC = sys::fs::copy_file(Src, Dest))
+ if (std::error_code EC = fs::copy_file(Src, Dest))
error(EC, "failed to copy file: " + Dest);
}
// supposed to be used by users to report an issue to LLD developers.
void elf::createResponseFile(const llvm::opt::InputArgList &Args) {
// Create the output directory.
- if (std::error_code EC = sys::fs::create_directories(
- Config->Reproduce, /*IgnoreExisting=*/false)) {
+ if (std::error_code EC =
+ fs::create_directories(Config->Reproduce, /*IgnoreExisting=*/false)) {
error(EC, Config->Reproduce + ": can't create directory");
return;
}
SmallString<128> Path;
path::append(Path, Config->Reproduce, "response.txt");
std::error_code EC;
- raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
+ raw_fd_ostream OS(Path, EC, fs::OpenFlags::F_None);
check(EC);
// Copy the command line to response.txt while rewriting paths.
std::string elf::findFromSearchPaths(StringRef Path) {
for (StringRef Dir : Config->SearchPaths) {
std::string FullPath = buildSysrootedPath(Dir, Path);
- if (sys::fs::exists(FullPath))
+ if (fs::exists(FullPath))
return FullPath;
}
return "";
std::string elf::buildSysrootedPath(StringRef Dir, StringRef File) {
SmallString<128> Path;
if (Dir.startswith("="))
- sys::path::append(Path, Config->Sysroot, Dir.substr(1), File);
+ path::append(Path, Config->Sysroot, Dir.substr(1), File);
else
- sys::path::append(Path, Dir, File);
+ path::append(Path, Dir, File);
return Path.str();
}