[PATCH] D22418: COFF: Implement /reproduce flag.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 11:16:55 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:272-273
@@ -271,6 +271,4 @@
// if you are trying to understand the whole picture of the code.
- Cpio.reset(CpioFile::create(Path));
- if (Cpio) {
- Cpio->append("response.txt", createResponseFile(Args));
- Cpio->append("version.txt", getVersionString());
- }
+ Cpio.reset(check(CpioFile::create(Path),
+ Twine("--reproduce: failed to open ") + Path + ".cpio"));
+ Cpio->append("response.txt", createResponseFile(Args));
----------------
check does not return if there's an error, but we want to return to the caller as it is not a critical error such as object file is corrupted.
================
Comment at: lib/Core/Reproduce.cpp:81
@@ +80,3 @@
+ SmallString<128> Abs = Path;
+ if (std::error_code EC = sys::fs::make_absolute(Abs))
+ return EC;
----------------
How can it fail?
https://reviews.llvm.org/D22418
More information about the llvm-commits
mailing list