[PATCH] D58943: [RISCV][MC] Find matching pcrel_hi fixup in more cases.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 09:18:34 PST 2019
efriedma marked 2 inline comments as done.
efriedma added inline comments.
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp:53
+ const MCSymbol *AUIPCSymbol = &AUIPCSRE->getSymbol();
+ const auto *DF = dyn_cast_or_null<MCDataFragment>(AUIPCSymbol->getFragment());
+
----------------
lewis-revill wrote:
> Perhaps I'm missing something, but I don't quite follow why this change (`AUIPCSRE->findAssociatedFragment()` -> `AUIPCSymbol->getFragment()`) was made?
It's a no-op. I just wanted to make the relationship between the fragment and the offset a bit more obvious.
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp:59
+ uint64_t Offset = AUIPCSymbol->getOffset();
+ if (DF->getContents().size() == Offset) {
+ DF = dyn_cast_or_null<MCDataFragment>(DF->getNextNode());
----------------
lewis-revill wrote:
> Nitpick: could we swap this to `Offset == DF->getContents().size()`?
Sure.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58943/new/
https://reviews.llvm.org/D58943
More information about the llvm-commits
mailing list