[PATCH] Add default parameter to MCSymbol accessors to control IsUsed
Pete Cooper via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 18:12:43 PDT 2015
Hey Vedant
LGTM. I'd appreciate an ok from Rafael too just in case I've missed something.
If he gives an ok then I'm happy to commit for you.
Cheers
Pete
Sent from my iPhone
> On Aug 6, 2015, at 3:14 PM, Vedant Kumar <vsk at apple.com> wrote:
>
> Hi,
>
> Currently, some accessors in MCSymbol set IsUsed when they shouldn't be. This can lead to surprising bugs.
>
> The first patch I've attached adds a default parameter, "SetUsed = true", to some MCSymbol accessors. This preserves the current behavior (NFC) without impacting existing code. It also buys us more flexibility when we don't want to set IsUsed.
>
> The second patch touches MC/AsmParser to fix an issue where we get "invalid reassignment of non-absolute variable" when the error doesn't apply.
>
> The second patch deserves closer scrutiny, because, try as I might, I couldn't craft a test case which gets this error to trigger. I need some help coming up for a test case for it. It could be the case that the error should never trigger -- if so, we can get rid of it.
>
> ninja check-all reports no issues.
>
> I don't have commit rights. I'd appreciate someone reviewing all of this and (hopefully) guiding it into trunk.
>
> thanks!
> vedant
>
> <MCSymbol-predicates-SetUsed.patch>
> <MCParser-invalid-reassignmet.patch>
>
>
More information about the llvm-commits
mailing list