[llvm] [ARM] Remove Subtarget from ARMAsmPrinter (PR #168264)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 03:22:52 PST 2025


================
@@ -680,14 +679,14 @@ void ARMAsmPrinter::emitAttributes() {
   if (isPositionIndependent()) {
     ATS.emitAttribute(ARMBuildAttrs::ABI_PCS_RW_data,
                       ARMBuildAttrs::AddressRWPCRel);
-  } else if (STI.isRWPI()) {
+  } else if (getTM().isRWPI()) {
     // RWPI specific attributes.
     ATS.emitAttribute(ARMBuildAttrs::ABI_PCS_RW_data,
                       ARMBuildAttrs::AddressRWSBRel);
   }
 
   // RO data addressing.
-  if (isPositionIndependent() || STI.isROPI()) {
+  if (isPositionIndependent() || getTM().isROPI()) {
----------------
smithp35 wrote:

Similar for `-fwrpi`, we may need to get this from the MachineFunction for the LTO case.

https://github.com/llvm/llvm-project/pull/168264


More information about the llvm-commits mailing list