[PATCH] D39111: Extensible LLVM RTTI

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 16:19:45 PDT 2017


lhames added a comment.

> The virtual call could be removed, perhaps, by having the base class hold a non-static member void*...

Oh that's clever. I hadn't thought of that. There is a space trade-off though as it would require one char per RTTI object (in addition to the current requirement of one BSS char per class).

My current thinking is that open hierarchies are primarily (perhaps only?) useful for types that use virtual methods already, and RTTI calls are likely to be rare / non-performance-sensitive for such types. If it were accepted, my advice was going to be "Use the new system if you know you need an open hierarchy, or you know you don't care about performance". E.g. libObject. (If it sounds surprising that Object should be an open hierarchy, consider Apple's text-based API files: We want them to present as symbolic files, but they're unlike any in-tree format. It seems reasonable that other users may have similarly quirky formats that they still might want to work with llvm-nm, etc.).


Repository:
  rL LLVM

https://reviews.llvm.org/D39111





More information about the llvm-commits mailing list