diff options
author | Rui Ueyama <ruiu@google.com> | 2017-01-06 02:33:53 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-01-06 02:33:53 +0000 |
commit | 7f1f912794b1276c309a395d1e206f8fd547a1ae (patch) | |
tree | 1e6cd7cd80e02fdac9a94b6f69b9f1044df20da9 /lld/include/lld | |
parent | 4bb7883f0cc0a59c0303329d5599a03fdffdb40e (diff) | |
download | bcm5719-llvm-7f1f912794b1276c309a395d1e206f8fd547a1ae.tar.gz bcm5719-llvm-7f1f912794b1276c309a395d1e206f8fd547a1ae.zip |
Use TarWriter to create tar archives instead of cpio.
This is how we use TarWriter in LLD. Now LLD does not append
a file extension, so you need to pass `--reproduce foo.tar`
instead of `--reproduce foo`.
Differential Revision: https://reviews.llvm.org/D28103
llvm-svn: 291210
Diffstat (limited to 'lld/include/lld')
-rw-r--r-- | lld/include/lld/Core/Reproduce.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lld/include/lld/Core/Reproduce.h b/lld/include/lld/Core/Reproduce.h index cf274749383..314cb8c9471 100644 --- a/lld/include/lld/Core/Reproduce.h +++ b/lld/include/lld/Core/Reproduce.h @@ -11,46 +11,15 @@ #define LLD_CORE_REPRODUCE_H #include "lld/Core/LLVM.h" -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" namespace llvm { - -class raw_fd_ostream; - namespace opt { class Arg; } - } namespace lld { -// This class creates a .cpio file for --reproduce (ELF) or /linkrepro (COFF). -// -// If "--reproduce foo" is given, we create a file "foo.cpio" and -// copy all input files to the archive, along with a response file -// to re-run the same command with the same inputs. -// It is useful for reporting issues to LLD developers. -// -// Cpio as a file format is a deliberate choice. It's standardized in -// POSIX and very easy to create. cpio command is available virtually -// on all Unix systems. See -// http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_07 -// for the format details. -class CpioFile { -public: - static ErrorOr<CpioFile *> create(StringRef OutputPath); - void append(StringRef Path, StringRef Data); - -private: - CpioFile(std::unique_ptr<llvm::raw_fd_ostream> OS, StringRef Basename); - - std::unique_ptr<llvm::raw_fd_ostream> OS; - llvm::StringSet<> Seen; - std::string Basename; -}; - // Makes a given pathname an absolute path first, and then remove // beginning /. For example, "../foo.o" is converted to "home/john/foo.o", // assuming that the current directory is "/home/john/bar". |