[PATCH] D66795: [Mips] Use appropriate private label prefix based on Mips ABI
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 10:05:26 PDT 2019
arichardson added a comment.
In D66795#1647242 <https://reviews.llvm.org/D66795#1647242>, @mbrkusanin wrote:
> In D66795#1646832 <https://reviews.llvm.org/D66795#1646832>, @arichardson wrote:
>
> > Would it be possible to require a `const MCTargetOptions &Options` when creating MCAsmInfo?
> > If MCTargetOptions isn't always available, how about passing an `Optional<MCTargetOptions>` to MCAsmInfo? That would be equivalent to the current approach but make it harder to forget calling `adjustPrefixes()`
>
>
> That would look something like this https://reviews.llvm.org/differential/diff/217420/ . I've already tested this solution earlier (except using Optional<>) but decided against it because of changes to MCAsmInfo for every target. Yes, the advantage is that it would be harder to forget about 'adjustPrefixes()' vs some more changes in code. Let me know which way you prefer.
I forgot that MCTargetOptions will be a pointer so using nullptr is probably easier than Optional.
Personally, I would prefer always passing MCTargetOptions to MCAsmInfo since it will allow us to use MipsABIInfo to set appropriate values for CHERI-MIPS.
If you remove the default argument from `createMCAsmInfo`, how many files need to explicitly pass nullptr/None?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66795/new/
https://reviews.llvm.org/D66795
More information about the llvm-commits
mailing list