This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Delete the RelExpr member R_HINT. NFC
ClosedPublic

Authored by MaskRay on Dec 22 2019, 5:09 PM.

Details

Summary

R_HINT is ignored like R_NONE. There are no strong reasons to keep
R_HINT. The largest RelExpr member R_RISCV_PC_INDIRECT is 60 now.

Event Timeline

MaskRay created this revision.Dec 22 2019, 5:09 PM

I think this is fine, but would like to hear what others think.

lld/ELF/Arch/RISCV.cpp
232

This place deserves a comment then.

lld/ELF/Relocations.cpp
1262

if (expr == R_NONE) ?

MaskRay updated this revision to Diff 235171.Dec 23 2019, 11:47 AM
MaskRay marked 2 inline comments as done.

Simplify

lld/ELF/Arch/RISCV.cpp
232

@jrtc27 will add it on D71820. Ignoring R_RISCV_ALIGN deserves a warning/error.

(For more interesting problems, see D70157 how this can be risky in a few constructs (I'd say in 99% cases they are probably fine))

This revision was not accepted when it landed; it landed in state Needs Review.Jan 14 2020, 11:02 AM
This revision was automatically updated to reflect the committed changes.