[Lldb-commits] [PATCH] D43837: Move option parsing out of the Args class
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 28 11:14:46 PST 2018
labath added a comment.
In https://reviews.llvm.org/D43837#1022430, @jingham wrote:
> I still worry a bit because there's another unstated responsibility for Args which is that even though it is going to get used at a very high level in lldb it has to NOT depend on anything you don't want lldb-server to depend on.
This will be enforced by moving the class (once I get rid of the extra static functions like you mentioned) into the Utility module. Nothing in the Utility module can depend on anything outside of that module.
================
Comment at: include/lldb/Interpreter/Options.h:123-126
+ llvm::Expected<Args> Parse(const Args &args,
+ ExecutionContext *execution_context,
+ lldb::PlatformSP platform_sp,
+ bool require_validation);
----------------
zturner wrote:
> It appears that all of these could be static functions. Can we do that?
They can't be. All of them access the `this` object. If you look at the original functions, they were taking an `Options&` as an argument and `Args` as `this`. These have that inverted.
https://reviews.llvm.org/D43837
More information about the lldb-commits
mailing list