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

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 03:22:53 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()) {
----------------
smithp35 wrote:

Would this get set if the user had not put command-line flags on the link step of their LTO.
```
clang -flto -frwpi input.c
clang input.o (other linker driver flags but no c-flags like -frwpi)
```

Although looking at the existing `ARMSubtarget::isROPI()` it looks like that may not have worked beforehand.

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


More information about the llvm-commits mailing list