[PATCH] D62973: [llvm-objcopy] Error when --preserve-dates used on standard streams
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 13:07:11 PDT 2019
rupprecht added inline comments.
================
Comment at: llvm/test/tools/llvm-objcopy/ELF/preserve-dates.test:1
+# RUN: llvm-objcopy %p/Inputs/alloc-symtab.o %t
+# RUN: test %t -nt %p/Inputs/alloc-symtab.o
----------------
This test is redundant w/ strip-preserve-atime.test and strip-preserve-mtime.test, so you can remove it.
================
Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:210-213
+ if (Config.PreserveDates) {
+ if (Config.InputFilename == "-" || Config.OutputFilename == "-")
+ return createStringError(errc::invalid_argument,
+ "--preserve-dates requires a file");
----------------
Flag validation errors should go in CopyConfig.cpp whenever possible so we can do simple validation as early as possible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62973/new/
https://reviews.llvm.org/D62973
More information about the llvm-commits
mailing list