forked from OSchip/llvm-project
Remove unnecessary namespace specifiers.
llvm-svn: 268278
This commit is contained in:
parent
a801dc17d9
commit
fc28827216
|
@ -122,11 +122,11 @@ void elf::copyInputFile(StringRef Src) {
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -150,8 +150,8 @@ static std::string rewritePath(StringRef S) {
|
|||
// 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;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ void elf::createResponseFile(const llvm::opt::InputArgList &Args) {
|
|||
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.
|
||||
|
@ -191,7 +191,7 @@ void elf::createResponseFile(const llvm::opt::InputArgList &Args) {
|
|||
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 "";
|
||||
|
@ -216,8 +216,8 @@ std::string elf::searchLibrary(StringRef Path) {
|
|||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue