<div dir="ltr"><span style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px">Hi all,</span><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px">I've written<span class="inbox-inbox-Apple-converted-space"> </span><a href="http://reviews.llvm.org/D21485" target="_blank">a patch</a><span class="inbox-inbox-Apple-converted-space"> </span>to support subcommands in llvm command line tools.  This potentially has broad interest (either positive or negative), so I figured I'd give a heads up here instead of just on llvm-commits.</div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px">The motivation for this is that we frequently have tools with incompatible sets of command line options.  I ran into this on llvm-pdbdump and was debating breaking off some of the functionality into a separate tool to make the command line interface more sensible, and to prevent people getting confused about which options could be used with which other options.</div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px">A better approach to this, in my opinion, is the use of sub commands.  This way all the options that can be used together are grouped together, and you simply can't specify incompatible options at the same time.</div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px">There is more information in the patch, including some examples of what it looks like, so if you're interested in this or have a strong opinion one way or the other, let me know.</div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(33,33,33);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:13px">Note that this is an **opt in** feature, and if you continue using cl::opt as you always have, this change should be invisible to you.</div></div>