SymbolBody constructor and friends take isFunc and isTLS boolean arguments. ELF symbols have already a type so than be easily passed down. This makes code a little bit more readable, I think.
The next patch in this series will remove isTLS.
Details
Diff Detail
Event Timeline
Note (to future self and others): this minor yak was motivated by a bug I found.
Some symbols are not emitted in the symbol table with the appropriate type, e.g. STT_OBJECT.
The current code logic would require passing another bool isObject around. Up to two additional argument, this stretching exercise was a little bit goofy but still acceptable, but with more types to support, is just too much, IMHO.
This looks good to me, but do you want to do isTLS in the same patch? This patch itself does not reduce the number of parameters, so I think this patch more sense if you do both at once.
Hi Davide,
Change itself looks good for me, but I have few thoughts about possible implementation and prepared a little patch here: http://reviews.llvm.org/D17879.