[lld] r268324 - Simplify. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 15:52:15 PDT 2016


Author: rafael
Date: Mon May  2 17:52:15 2016
New Revision: 268324

URL: http://llvm.org/viewvc/llvm-project?rev=268324&view=rev
Log:
Simplify. NFC.

Modified:
    lld/trunk/ELF/DriverUtils.cpp

Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=268324&r1=268323&r2=268324&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Mon May  2 17:52:15 2016
@@ -120,8 +120,7 @@ static std::string getDestPath(StringRef
 // 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;




More information about the llvm-commits mailing list