File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,8 @@ const TargetInfo::RelocAttrs &ARM64::getRelocAttrs(uint8_t type) const {
69
69
{" ADDEND" , B (ADDEND)},
70
70
#undef B
71
71
}};
72
- assert (type >= 0 && type < relocAttrsArray.size () &&
73
- " invalid relocation type" );
74
- if (type < 0 || type >= relocAttrsArray.size ())
72
+ assert (type < relocAttrsArray.size () && " invalid relocation type" );
73
+ if (type >= relocAttrsArray.size ())
75
74
return TargetInfo::invalidRelocAttrs;
76
75
return relocAttrsArray[type];
77
76
}
Original file line number Diff line number Diff line change @@ -58,9 +58,8 @@ const TargetInfo::RelocAttrs &X86_64::getRelocAttrs(uint8_t type) const {
58
58
{" TLV" , B (PCREL) | B (EXTERN) | B (TLV) | B (LOAD) | B (BYTE4)},
59
59
#undef B
60
60
}};
61
- assert (type >= 0 && type < relocAttrsArray.size () &&
62
- " invalid relocation type" );
63
- if (type < 0 || type >= relocAttrsArray.size ())
61
+ assert (type < relocAttrsArray.size () && " invalid relocation type" );
62
+ if (type >= relocAttrsArray.size ())
64
63
return TargetInfo::invalidRelocAttrs;
65
64
return relocAttrsArray[type];
66
65
}
You can’t perform that action at this time.
0 commit comments