[lld] r349571 - Fix error message.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 15:33:10 PST 2018


Author: ruiu
Date: Tue Dec 18 15:33:10 2018
New Revision: 349571

URL: http://llvm.org/viewvc/llvm-project?rev=349571&view=rev
Log:
Fix error message.

Previously, this code printed out an error message like this

  ld.lld: error: --reproduce: failed to open /foo: cannot open /foo

Apparently "failed to open /foo:" part is redundant.

Modified:
    lld/trunk/ELF/Driver.cpp

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=349571&r1=349570&r2=349571&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue Dec 18 15:33:10 2018
@@ -407,8 +407,7 @@ void LinkerDriver::main(ArrayRef<const c
       Tar->append("version.txt", getLLDVersion() + "\n");
       make<std::unique_ptr<TarWriter>>(std::move(*ErrOrWriter));
     } else {
-      error(Twine("--reproduce: failed to open ") + Path + ": " +
-            toString(ErrOrWriter.takeError()));
+      error("--reproduce: " + toString(ErrOrWriter.takeError()));
     }
   }
 




More information about the llvm-commits mailing list