[PATCH] D149526: [JITLink][RISCV] Implement linker relaxation
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 21:47:23 PDT 2023
lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.
I believe that this is blocked by the subtarget features patch, but otherwise LGTM.
================
Comment at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:645-648
+ void setOffset(orc::ExecutorAddrDiff NewOffset) {
+ assert(NewOffset <= MaxOffset && "Offset out of range");
+ Offset = NewOffset;
+ }
----------------
This could be moved to just below `Symbol::getOffset` to improve readability.
All defined symbols have blocks, so you could change the assert to:
```
assert(NewOffset < getBlock().getSize() && "Offset out of range");
```
to get a stricter bounds check.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149526/new/
https://reviews.llvm.org/D149526
More information about the llvm-commits
mailing list