[PATCH] D77080: [NFC][XCOFF][AIX] Refactor get/setContainingCsect
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 17:27:06 PDT 2020
daltenty added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5146
SectionKind::getMetadata());
- S->setContainingCsect(Sec);
+ S->setCsectMCSectionXCOFF(Sec);
}
----------------
It feels like this breaks the constraint you had listed under 2, since the symbol S is not actually the symbol representing the csect (i.e. the qualname symbol). Would we be able to wrap this whole business in a call to an new TLOF function like `TargetLoweringObjectFileXCOFF::getSectionForUndefinedFunction(StringRef)` and just use the qualname symbol we get back instead (so we don't need to call `setCsectMCSectionXCOFF()` seperately)?
If we can do this we could restrict `setCsectMCSectionXCOFF()` so it can only be called from MCSectionXCOFF's constructor, enforcing the constraint that this only valid for symbols representing csects (and `hasCsectMCSectionXCOFF()` could become `isCsect()` ).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77080/new/
https://reviews.llvm.org/D77080
More information about the llvm-commits
mailing list