[PATCH] D122236: [RISCV] Fix crash for initial section alignment with .option norvc
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 08:33:15 PDT 2022
StephenFan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:610-611
// Insert the fixup only when linker relaxation enabled.
- if (!STI.getFeatureBits()[RISCV::FeatureRelax])
+ const MCSubtargetInfo *STI = AF.getSubtargetInfo();
+ if (!STI->getFeatureBits()[RISCV::FeatureRelax])
return false;
----------------
luismarques wrote:
> This one wasn't needed to fix the crash but, presumably, this check should also be fixed?
I agree this check should also be fixed. And if it would be better to have a test that can test this fix?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122236/new/
https://reviews.llvm.org/D122236
More information about the llvm-commits
mailing list