[patch] Start merging MCSection and MCSectionData
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu May 21 12:31:05 PDT 2015
> On 2015-May-21, at 11:08, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>
>> 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.
Okay, sounds fine. Back to the patch:
> The attached patch starts merging the two by moving the alignment from
> MCSectionData to MCSection.
>
> Most of the patch is actually just dropping 'const', since
> MCSectionData is mutable, but MCSection was not.
Can you do these two things separately? It's hard to find the
alignment changes.
More information about the llvm-commits
mailing list