Page MenuHomePhabricator

[lldb/Reproducers] Simplify LLDB_RECORD macros

Authored by JDevlieghere on Apr 14 2020, 12:08 PM.



Redefine the LLDB_RECORD macros in terms of a common uber-macro to reduce code duplication across them.

Diff Detail

Event Timeline

JDevlieghere created this revision.Apr 14 2020, 12:08 PM

Add a comment

This looks even better than I hoped. I think this is a worthwhile simplification even without the followup patches. Just a couple of questions inline...


Could you merge these two in a similar way as well (not with the method macros, just with themselves)? I know that the constructors could be implemented as a function in the other patch, but I have a feeling it will be pretty confusing if two very similar functionalities were implemented in completely different ways...


idea: Should we standardize the name of the inner class and drop the Method argument?


Why the void overload? It looks like the templated version would work just fine for void too...

JDevlieghere marked 3 inline comments as done.

Address Pavel's code review feedback

labath accepted this revision.Apr 16 2020, 12:24 AM

Very nice.

This revision is now accepted and ready to land.Apr 16 2020, 12:24 AM
This revision was automatically updated to reflect the committed changes.