[PATCH] D42873: [llvm-objcopy] Adjust --strip-dwo behavior

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 16:10:22 PST 2018


jakehehrlich added a comment.

Yeah outputting to "-" was a mistake I made in literally the first patch that got this all started. In fact I inherited some starter code (file reading, error handeling, etc..) from Petr and that was from that. I believe Petr ripped it out of some other tool like yaml2obj (which outputs to standard out). This bug is probably the oldest remaining bug in the codebase. I feel a strange attachment to it now even though I just learned about it.

I agree with James, this should not be specific to StripDWO.



================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:75
 static cl::opt<std::string> InputFilename(cl::Positional, cl::desc("<input>"));
 static cl::opt<std::string> OutputFilename(cl::Positional, cl::desc("<output>"),
                                            cl::init("-"));
----------------
Can you make this decleration the following instead?

```
static cl::opt<std::string> OutputFilename(cl::Positional, cl::desc("[ <output> ] "));
```


Repository:
  rL LLVM

https://reviews.llvm.org/D42873





More information about the llvm-commits mailing list