Skip to content

Commit

Permalink
[MC] [Win64EH] Simplify code using WinEH::Instruction::operator!=. NFC.
Browse files Browse the repository at this point in the history
operator== and operator!= were added in
1308bb9 / D87369, but this existing
codepath wasn't updated to use them.

Also fix the indentation of the enclosed liens.

Differential Revision: https://reviews.llvm.org/D125368
  • Loading branch information
mstorsjo committed May 12, 2022
1 parent 3036382 commit 490cd14
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions llvm/lib/MC/MCWin64EH.cpp
Expand Up @@ -532,11 +532,9 @@ FindMatchingEpilog(const std::vector<WinEH::Instruction>& EpilogInstrs,

bool Match = true;
for (unsigned i = 0; i < Instrs.size(); ++i)
if (Instrs[i].Operation != EpilogInstrs[i].Operation ||
Instrs[i].Offset != EpilogInstrs[i].Offset ||
Instrs[i].Register != EpilogInstrs[i].Register) {
Match = false;
break;
if (Instrs[i] != EpilogInstrs[i]) {
Match = false;
break;
}

if (Match)
Expand Down

0 comments on commit 490cd14

Please sign in to comment.