[Lldb-commits] [PATCH] D35065: [LLDB][ppc64le] Rename enums in AuxVector

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 7 01:17:35 PDT 2017


labath added inline comments.


================
Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp:115
   _type:                                                                       \
   name = #_type
   switch (type) {
----------------
joerg wrote:
> krytarowski wrote:
> > brunoalr wrote:
> > > joerg wrote:
> > > > labath wrote:
> > > > > If we go about renaming them, then we should change this, as we still want to display the standard name of the entries.
> > > > Or name = "AUXV_AT_???" ENTRY_NAME(type) name = #type and then return name + 4;
> > > Hmm that looks too "hacky", doesn't it?
> > `name + 4` looks prettier to me.
> Just using the name directly makes this searchable. The cleanup is an implementation detail, even if it might waste a bit space.
I think name+4 (well, 5) is fine, but if you want to keep it this way, then I'd suggest you hardcode the AUXV_ prefix into the macro (`#define ENTRY_NAME(type) AUXV_##type: name = #type`. This is just adds redundant magic.


https://reviews.llvm.org/D35065





More information about the lldb-commits mailing list