[llvm] [MC] Remove SectionKind from MCSection (PR #96067)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 13:06:34 PDT 2024


MaskRay wrote:

Thanks for the cleanup! The StringSwitch use in getELFSection was added when @compnerd and I were still figuring out how to handle RISC-V linker relaxation properly.

With some cleanup made last year, this should be unneeded.

> This has been fixed by my [[RISCV] Make linker-relaxable instructions terminate MCDataFragment](https://reviews.llvm.org/D153097) and [[RISCV] Allow delayed decision for ADD/SUB relocations](https://reviews.llvm.org/D155357). For a label difference A-B in assembly, if A and B are in the same section and not separated by alignment directives, assembler-relaxable instructions, or linker-relaxable instructions, A-B can be folded as a constant.

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


More information about the llvm-commits mailing list