[patch] Start merging MCSection and MCSectionData
Rafael EspĂndola
rafael.espindola at gmail.com
Thu May 21 11:08:45 PDT 2015
> Instead of dropping `const` with `MCSymbol`, I made all the `MCSymbolData`
> fields `mutable`. The downside of my approach is that the fields are
> always mutable.
>
> I'm not particularly tied to the way I did things; I mostly did it that
> way since there were already a bunch of `mutable` fields in `MCSymbol`.
> However, there does seem to be a real separation between when the two
> sets of fields need to be modified. I haven't looked at whether the
> same is true of `MCSymbolData`.
>
> Any thoughts on which approach is better?
I think the only field that is reasonable to keep as mutable is the
End symbol. The reason being that it can be quietly created if it
didn't exist already.
I made the begin symbol mutable too, but that feels like a hack.
Cheers,
Rafael
More information about the llvm-commits
mailing list