[llvm] c7b3b71 - [llvm] Remove redundant override 'RecordStreamer::emitInstruction' (NFC)

Youngsuk Kim via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 5 12:12:35 PST 2023


Author: Youngsuk Kim
Date: 2023-11-05T14:10:53-06:00
New Revision: c7b3b71a415ae78d329b9c5a65eb1d93b4b960ec

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

LOG: [llvm] Remove redundant override 'RecordStreamer::emitInstruction' (NFC)

`RecordStreamer::emitInstruction` simply calls
`MCStreamer::emitInstruction` (overrided method of parent class), which
makes the override unnecessary.

Added: 
    

Modified: 
    llvm/lib/Object/RecordStreamer.cpp
    llvm/lib/Object/RecordStreamer.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Object/RecordStreamer.cpp b/llvm/lib/Object/RecordStreamer.cpp
index 2548dd6c84d2a3a..d01076c0bceb1e3 100644
--- a/llvm/lib/Object/RecordStreamer.cpp
+++ b/llvm/lib/Object/RecordStreamer.cpp
@@ -81,11 +81,6 @@ RecordStreamer::const_iterator RecordStreamer::begin() {
 
 RecordStreamer::const_iterator RecordStreamer::end() { return Symbols.end(); }
 
-void RecordStreamer::emitInstruction(const MCInst &Inst,
-                                     const MCSubtargetInfo &STI) {
-  MCStreamer::emitInstruction(Inst, STI);
-}
-
 void RecordStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
   MCStreamer::emitLabel(Symbol);
   markDefined(*Symbol);

diff  --git a/llvm/lib/Object/RecordStreamer.h b/llvm/lib/Object/RecordStreamer.h
index a568739d3763cc6..70b41f270720b49 100644
--- a/llvm/lib/Object/RecordStreamer.h
+++ b/llvm/lib/Object/RecordStreamer.h
@@ -45,7 +45,6 @@ class RecordStreamer : public MCStreamer {
 public:
   RecordStreamer(MCContext &Context, const Module &M);
 
-  void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override;
   void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
   void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
   bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;


        


More information about the llvm-commits mailing list