lld: Merging Symbol and SymbolBody

Hi guys,

I’m planning to merge Symbol and SymbolBody into one unified class, Symbol in lld. That would be a pretty much mechanical change, but because symbols are used everywhere, the patch would be a large one.

This mail is to heads-up, and if you have any concern, please let me know.

Background:

Symbol and SymbolBody are defined as separate classes for a historical reason. Symbol used to be a pointer to SymbolBody, and the relationship between Symbol and SymbolBody was 1:n. However, because Peter made a change to allocate them next to each other, the relationship is now 1:1. So, there’s no reason to keep them separated anymore. Unifying them simplifies the relationships between symbol classes.

I created this patch https://reviews.llvm.org/D39406 to merge them. It isn’t as worrisome as I originally thought. I think it’s rather small and mechanical change.