Skip to content

Commit 3626594

Browse files
committed
Update for review comments.
1 parent d259005 commit 3626594

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lld/ELF/Relocations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ void RelocationScanner::scanOne(typename Relocs<RelTy>::const_iterator &i) {
15241524
return;
15251525

15261526
RelExpr expr;
1527-
if (rv_vendor.empty()) {
1527+
if (LLVM_LIKELY(rv_vendor.empty())) {
15281528
expr = ctx.target->getRelExpr(type, sym, sec->content().data() + offset);
15291529
} else {
15301530
expr = ctx.target->getVendorRelExpr(

lld/ELF/Target.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class TargetInfo {
3535
const uint8_t *loc) const = 0;
3636
virtual RelExpr getVendorRelExpr(RelType type, const Symbol &s,
3737
const uint8_t *loc, StringRef vendor) const {
38+
Err(ctx) << "target doesn't support vendor-specific relocations";
3839
return R_NONE;
3940
};
4041
virtual RelType getDynRel(RelType type) const { return 0; }

0 commit comments

Comments
 (0)