#include "llvm/Support/LockFileManager.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/PathV1.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/Timer.h"
}
}
} else if (!it->Filename.empty() && EraseFiles)
- llvm::sys::Path(it->Filename).eraseFromDisk();
+ llvm::sys::fs::remove(it->Filename);
}
OutputFiles.clear();
} else if (InFile == "-") {
OutFile = "-";
} else if (!Extension.empty()) {
- llvm::sys::Path Path(InFile);
- Path.eraseSuffix();
- Path.appendSuffix(Extension);
+ SmallString<128> Path(InFile);
+ llvm::sys::path::replace_extension(Path, Extension);
OutFile = Path.str();
} else {
OutFile = "-";
// otherwise we want to fail early.
SmallString<256> AbsPath(OutputPath);
llvm::sys::fs::make_absolute(AbsPath);
- llvm::sys::Path OutPath(AbsPath);
+ StringRef OutPath = AbsPath;
bool ParentExists = false;
if (llvm::sys::fs::exists(llvm::sys::path::parent_path(AbsPath.str()),
ParentExists))
bool Exists;
if ((CreateMissingDirectories || ParentExists) &&
((llvm::sys::fs::exists(AbsPath.str(), Exists) || !Exists) ||
- (OutPath.isRegularFile() &&
+ (llvm::sys::fs::is_regular_file(OutPath) &&
llvm::sys::fs::can_write(AbsPath.c_str())))) {
// Create a temporary file.
SmallString<128> TempPath;
// doesn't make sense for all clients, so clean this up manually.
Instance.clearOutputFiles(/*EraseFiles=*/true);
if (!TempModuleMapFileName.empty())
- llvm::sys::Path(TempModuleMapFileName).eraseFromDisk();
+ llvm::sys::fs::remove(TempModuleMapFileName.str());
// We've rebuilt a module. If we're allowed to generate or update the global
// module index, record that fact in the importing compiler instance.