[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:28:46 PDT 2022
StephenFan added a comment.
This patch makes sense to me and I think it is a correct fix.
In LLVM MC, the `STI`'s feature bits is not mutable, it was determined by the command line before parsing the file. And to deal with directives like `.option rvc`, the Parser maintains an `STI` and replaces it with a new `STI` when the subtarget extensions were enabled or disabled. So we need to use `MCAlignFragment`'s `STI` which is generated using the replaced `STI` by the parser. Is my understanding correct?
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