[Lldb-commits] [PATCH] D68361: [dsymutil] Tablegenify option parsing

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 2 16:57:20 PDT 2019

JDevlieghere created this revision.
JDevlieghere added reviewers: friss, aprantl, thegameg.
Herald added subscribers: llvm-commits, mgorny.
Herald added projects: LLDB, LLVM.

This patch reimplements command line option parsing in dsymutil with Tablegen and libOption. The main motivation for this change is to prevent clashes with other cl::opt options defined in llvm. Although it's a bit more heavyweight, it has some nice advantages such as no global static initializers and better separation between the code and the option definitions.

I also used this opportunity to improve how dsymutil deals with incompatible options. Instead of having checks spread across the code, everything is now grouped together in `verifyOptions`. The fact that the options are no longer global means that we need to pass them around a bit more, but I think it's worth the tradeoff.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68361.222934.patch
Type: text/x-patch
Size: 35573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191002/e468e263/attachment-0001.bin>

More information about the lldb-commits mailing list