summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-05-02 22:52:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-05-02 22:52:15 +0000
commit133ebe5bc7519592eea7af34df94b9a0ca9875f2 (patch)
tree2b614169a5c5f49fb7cef9caa2df2f7ebc7afc5d
parent56aa4b062954e34340f36b25f339448cfc888913 (diff)
downloadbcm5719-llvm-133ebe5bc7519592eea7af34df94b9a0ca9875f2.tar.gz
bcm5719-llvm-133ebe5bc7519592eea7af34df94b9a0ca9875f2.zip
Simplify. NFC.
llvm-svn: 268324
-rw-r--r--lld/ELF/DriverUtils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index 4380a832536..74c50f7613d 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -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;
OpenPOWER on IntegriCloud