Simplify. NFC.

llvm-svn: 268324
This commit is contained in:
Rafael Espindola 2016-05-02 22:52:15 +00:00
parent 56aa4b0629
commit 133ebe5bc7
1 changed files with 1 additions and 2 deletions

View File

@ -120,8 +120,7 @@ static std::string getDestPath(StringRef Path) {
// Copies file Src to {Config->Reproduce}/Src.
void elf::copyInputFile(StringRef Src) {
std::string Dest = getDestPath(Src);
SmallString<128> Dir(Dest);
path::remove_filename(Dir);
StringRef Dir = path::parent_path(Dest);
if (std::error_code EC = fs::create_directories(Dir)) {
error(EC, Dir + ": can't create directory");
return;