Skip to content

Commit 1d75f4c

Browse files
committed
swap the operands in the comparison and allow END == end of section
1 parent 706cffa commit 1d75f4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/tools/llvm-readobj/COFFDumper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,11 +2112,11 @@ void COFFDumper::printCOFFPseudoReloc() {
21122112
}
21132113

21142114
if (const uint32_t Begin = RelocBegin.getValue(), End = RelocEnd.getValue();
2115-
Data.size() <= Begin || Data.size() <= End) {
2115+
Begin >= Data.size() || End > Data.size()) {
21162116
reportUniqueWarning(
21172117
createStringError("the marker symbol of runtime pseudo-relocation "
21182118
"points past the end of the section: 0x%x",
2119-
Data.size() <= Begin ? Begin : End));
2119+
Begin >= Data.size() ? Begin : End));
21202120
return;
21212121
}
21222122

0 commit comments

Comments
 (0)