From 21b439704ca697a76424710ad6a89dcdcaddc932 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 18 Feb 2025 08:44:29 -0800 Subject: [PATCH] [AsmPrinter] Avoid repeated hash lookups (NFC) --- llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp index 1c603f5988ad1..e8d1aba63afb4 100644 --- a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp @@ -252,10 +252,10 @@ void EHStreamer::computeCallSiteTable( if (&MBB == &Asm->MF->front() || MBB.isBeginSection()) { // We start a call-site range upon function entry and at the beginning of // every basic block section. - CallSiteRanges.push_back( - {Asm->MBBSectionRanges[MBB.getSectionID()].BeginLabel, - Asm->MBBSectionRanges[MBB.getSectionID()].EndLabel, - Asm->getMBBExceptionSym(MBB), CallSites.size()}); + auto &Range = Asm->MBBSectionRanges[MBB.getSectionID()]; + CallSiteRanges.push_back({Range.BeginLabel, Range.EndLabel, + Asm->getMBBExceptionSym(MBB), + CallSites.size()}); PreviousIsInvoke = false; SawPotentiallyThrowing = false; LastLabel = nullptr;