aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-03-14 15:17:38 -0700
committerFangrui Song <i@maskray.me>2023-03-14 15:17:38 -0700
commit2f5fe16e6d29c55ebd9ec098b03d4de47a804a18 (patch)
tree8d4b5d3b88edef2f247a7dbc7a38e7e6e72a96f7 /llvm/lib/Support/CommandLine.cpp
parent0ddc283a29a7a2d5415a3d363396e39c262a5dc2 (diff)
downloadllvm-2f5fe16e6d29c55ebd9ec098b03d4de47a804a18.zip
llvm-2f5fe16e6d29c55ebd9ec098b03d4de47a804a18.tar.gz
llvm-2f5fe16e6d29c55ebd9ec098b03d4de47a804a18.tar.bz2
[RISCV][MC] Adjust conditions to emit R_RISCV_ADD*/R_RISCV_SUB* pairs
D132262 tried to simplify `IsMetadataOrEHFrameSection` originally introduced in D127549 but caused a regression as `.quad` directives in ``` .section .note,"a",@note; note: .quad extern-note # extern is undefined .section .rodata,"a",@progbits; rodata: .quad extern-rodata # extern is undefined .section .nonalloc,"",@progbits; nw: .quad extern-nw ``` are incorrectly rejected: these differences may be link-time constants and are allowed in GNU assembler and LLVM MC's non-RISC-V ports. Relax the conditions to allow these cases. For A-B, A may be defined later, but this requiresFixups call has to eagerly make a decision. For now, emit ADD/SUB unless A is `.L*`. This euristic handles many temporary label differences for .debug_* and .apple_types sections. Ideally we should delay the decision of PC-relative vs ADD/SUB until A is defined. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D145474
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions