From e7622ab4721141d9e6af6041fa7f9bbc1029e9aa Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 22 Jun 2024 23:23:47 -0700 Subject: [MC] Remove unused MCObjectStreamer::CurSubsectionIdx. NFC --- llvm/include/llvm/MC/MCObjectStreamer.h | 1 - llvm/lib/MC/MCObjectStreamer.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/include/llvm/MC/MCObjectStreamer.h b/llvm/include/llvm/MC/MCObjectStreamer.h index a9c0c71..1d1af6f 100644 --- a/llvm/include/llvm/MC/MCObjectStreamer.h +++ b/llvm/include/llvm/MC/MCObjectStreamer.h @@ -43,7 +43,6 @@ class MCObjectStreamer : public MCStreamer { std::unique_ptr Assembler; bool EmitEHFrame; bool EmitDebugFrame; - unsigned CurSubsectionIdx = 0; struct PendingMCFixup { const MCSymbol *Sym; MCFixup Fixup; diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 25c5768..5dc73c5 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -295,8 +295,7 @@ bool MCObjectStreamer::changeSectionImpl(MCSection *Section, getContext().clearDwarfLocSeen(); bool Created = getAssembler().registerSection(*Section); - CurSubsectionIdx = Subsection; - Section->switchSubsection(CurSubsectionIdx); + Section->switchSubsection(Subsection); return Created; } -- cgit v1.1