hans added a comment. In https://reviews.llvm.org/D53457#1279191, @neerajksingh wrote:
> In https://reviews.llvm.org/D53457#1278579, @hans wrote: > > > The `-Xclang` option has the same issue, and I think `/clang:` should work > > similarly, i.e. `/clang:-MF /clang:<filename>`. It's not pretty, but at > > least it's consistent. Yes, that means processing consecutive `/Xclang:` > > options together, but hopefully that's doable. > > > It looks like the handling for -Xclang is a lot simpler (in > `Clang::ConstructJob`). There the Xclang options are all gathered and > forwarded at a particular spot in the command line for cc1. They aren't > interleaved with other options, and it wouldn't really make sense to do so > anyway since it doesn't really look like cc1 arguments are constructed from > driver arguments in any particular order. > > The llvm/lib/Option/OptTable.cpp code is not really setup to easily > interleave arguments like would be required for your request. Can you see a > way to accomplish what you want without a deep refactoring of > OptTable::ParseArgs and the InputArgList class? Okay, if it's hard to do, I suppose collecting the /clang: options and processing them separately after the others is the second-best option. We'll need to make sure the behaviour is well-documented. https://reviews.llvm.org/D53457 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits