[lldb-dev] [RFC] Simplifying logging code
Zachary Turner via lldb-dev
lldb-dev at lists.llvm.org
Wed Aug 12 10:59:59 PDT 2015
After the previous discussion I agree that evaluating the arguments is
unacceptable. But you are correct here that a macro would solve this. In
fact, most C++ log libraries use macros I guess for this very reason.
I decided to make some macros for the windows plugin which you can look at
it in ProcessWindowsLog.h.
There are some issues that are not obvious how to solve though. For
example, the macros I wrote in ProcessWindowsLog cannot be used outside of
my plugin. This is because each plugin statically defines its own channels
as well as defines its own global Log object. If this were to be done in a
way that there were one set of macros that all current and future generic
code and plugins could use, I think it would require a fairly substantial
On Wed, Aug 12, 2015 at 6:11 AM Vince Harron via lldb-dev <
lldb-dev at lists.llvm.org> wrote:
> We could solve booth the efficiency concerns and the conciseness with a
> macro. (Gasp!)
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev