labath added a comment.
How about codegenning the entire implementation of `SetOptionValue`? That way
the user won't have to write any switch statements at all. Ideally, the
option-setting code would be something like:
void (Status?, Error?) SetOptionForce(StringRef arg, ExecutionContext *ctx) {
m_force = true; }
void (Status?, Error?) SetOptionGlobal(StringRef arg, ExecutionContext *ctx)
{ m_global = true; }
#include "The_thing_which_generates_SetOptionValue.inc"
The generated implementation of SetOptionValue could be the same as the current
one, except that it calls into these user-specified functions instead of
setting the values itself
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65386/new/
https://reviews.llvm.org/D65386
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits