[PATCH] D141176: [AVR] Support .reloc directive
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 7 07:12:59 PST 2023
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp:425
MCFixupKindInfo const &AVRAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
+ if (Kind >= FirstLiteralRelocationKind)
+ return MCAsmBackend::getFixupKindInfo(FK_NONE);
----------------
Two suggestions:
1. Put this after the
```
const static MCFixupKindInfo Infos[AVR::NumTargetFixupKinds]
```
and before
```
if (Kind < FirstTargetFixupKind)
return MCAsmBackend::getFixupKindInfo(Kind);
```
this code style is common among ARM, AArch64, and RISCV.
2. Add a comment line before, like
```
// Fixup kinds from .reloc directive are like R_AVR_NONE. They do not require
// any extra processing.
```
I also see the comment is common in other targets.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141176/new/
https://reviews.llvm.org/D141176
More information about the llvm-commits
mailing list