[llvm] efdb91e - [ARM] Move ARMELFStreamer::finishImpl to ARMTargetELFStreamer::finish. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 23 21:20:43 PDT 2024


Author: Fangrui Song
Date: 2024-06-23T21:20:38-07:00
New Revision: efdb91e1daba502481f8eab6116e3595766e2300

URL: https://github.com/llvm/llvm-project/commit/efdb91e1daba502481f8eab6116e3595766e2300
DIFF: https://github.com/llvm/llvm-project/commit/efdb91e1daba502481f8eab6116e3595766e2300.diff

LOG: [ARM] Move ARMELFStreamer::finishImpl to ARMTargetELFStreamer::finish. NFC

ELFStreamer::finishImpl is not intended to be further overridden.

Added: 
    

Modified: 
    llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
index 2114558ef56ed..31b577b9c301f 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
@@ -426,6 +426,8 @@ class ARMTargetELFStreamer : public ARMTargetStreamer {
   // Reset state between object emissions
   void reset() override;
 
+  void finish() override;
+
 public:
   ARMTargetELFStreamer(MCStreamer &S)
     : ARMTargetStreamer(S), CurrentVendor("aeabi") {}
@@ -459,8 +461,6 @@ class ARMELFStreamer : public MCELFStreamer {
 
   ~ARMELFStreamer() override = default;
 
-  void finishImpl() override;
-
   // ARM exception handling directives
   void emitFnStart();
   void emitFnEnd();
@@ -1113,12 +1113,9 @@ void ARMTargetELFStreamer::emitInst(uint32_t Inst, char Suffix) {
 
 void ARMTargetELFStreamer::reset() { AttributeSection = nullptr; }
 
-void ARMELFStreamer::finishImpl() {
-  MCTargetStreamer &TS = *getTargetStreamer();
-  ARMTargetStreamer &ATS = static_cast<ARMTargetStreamer &>(TS);
-  ATS.finishAttributeSection();
-
-  MCELFStreamer::finishImpl();
+void ARMTargetELFStreamer::finish() {
+  ARMTargetStreamer::finish();
+  finishAttributeSection();
 }
 
 void ARMELFStreamer::reset() {


        


More information about the llvm-commits mailing list