From 490cd14fe6ff119fa6f74832470eb29528a6f750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 24 Nov 2021 14:03:54 +0200 Subject: [PATCH] [MC] [Win64EH] Simplify code using WinEH::Instruction::operator!=. NFC. operator== and operator!= were added in 1308bb99e06752ab0b5175c92da31083f91af921 / 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 --- llvm/lib/MC/MCWin64EH.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp index 56ac18c3c1c9..0aa066eba594 100644 --- a/llvm/lib/MC/MCWin64EH.cpp +++ b/llvm/lib/MC/MCWin64EH.cpp @@ -532,11 +532,9 @@ FindMatchingEpilog(const std::vector& 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)