[PATCH] D13221: Make CompilerInvocation's use of the debug options more understandable.
Douglas Katzman via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 2 16:36:48 PDT 2015
dougk added a comment.
A few more remarks:
- The code which emits line-tables-only seems to understand dwarf2 versus dwarf4, but due solely to the way that arguments were parsed, the dwarf version did not propagate through to the compiler invocation if you also specified line-tables-only. The new pair of arguments does not have that issue.
So as mentioned on cfe-dev, this is another case of "yeah, I fixed that but wasn't really the intent". [All I want is MyriadToolchain to default to dwarf 2. That's it!]
- It was suggested to me that it ought to have been possible to pull out all of the g group argument processing so that ClangAs::ConstructJob can share a little bit more code with Clang::ConstructJob but I'd really prefer not to do that in this change. It's possible that another small cleanup can be done, but the governing factor is that somehow or another you also have to deal with the case where the integrated-as tool has to parse '-gdwarf-N' flags (because people can pass those with -Xassembler,-gdwarf-). So you've got to be able to parse plain old StringRefs, as opposed to "Arg", which, absent that requirement, you'd just do with getOption().matches(). As it is, I think the code is well factored for this purpose.
http://reviews.llvm.org/D13221
More information about the cfe-commits
mailing list