1 //===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "llvm/MC/MCStreamer.h"
11 #include "llvm/MC/MCContext.h"
12 #include "llvm/MC/MCInst.h"
13 #include "llvm/MC/MCSectionMachO.h"
14 #include "llvm/MC/MCSymbol.h"
15 
16 using namespace llvm;
17 
18 namespace {
19 
20   class MCNullStreamer : public MCStreamer {
21   public:
MCNullStreamer(MCContext & Context)22     MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
23 
24     /// @name MCStreamer Interface
25     /// @{
26 
EmitSymbolAttribute(MCSymbol * Symbol,MCSymbolAttr Attribute)27     bool EmitSymbolAttribute(MCSymbol *Symbol,
28                              MCSymbolAttr Attribute) override {
29       return true;
30     }
31 
EmitCommonSymbol(MCSymbol * Symbol,uint64_t Size,unsigned ByteAlignment)32     void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
33                           unsigned ByteAlignment) override {}
EmitZerofill(MCSection * Section,MCSymbol * Symbol=nullptr,uint64_t Size=0,unsigned ByteAlignment=0)34     void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
35                       uint64_t Size = 0, unsigned ByteAlignment = 0) override {}
EmitGPRel32Value(const MCExpr * Value)36     void EmitGPRel32Value(const MCExpr *Value) override {}
37   };
38 
39 }
40 
createNullStreamer(MCContext & Context)41 MCStreamer *llvm::createNullStreamer(MCContext &Context) {
42   return new MCNullStreamer(Context);
43 }
44