1 //===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/MC/MCContext.h"
11 #include "llvm/MC/MCInst.h"
12 #include "llvm/MC/MCSectionMachO.h"
13 #include "llvm/MC/MCStreamer.h"
14 #include "llvm/MC/MCSymbol.h"
20 class MCNullStreamer : public MCStreamer {
22 MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
24 /// @name MCStreamer Interface
27 bool EmitSymbolAttribute(MCSymbol *Symbol,
28 MCSymbolAttr Attribute) override {
32 void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
33 unsigned ByteAlignment) override {}
34 void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
35 uint64_t Size = 0, unsigned ByteAlignment = 0) override {}
36 void EmitGPRel32Value(const MCExpr *Value) override {}
37 void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {}
38 void EmitCOFFSymbolStorageClass(int StorageClass) override {}
39 void EmitCOFFSymbolType(int Type) override {}
40 void EndCOFFSymbolDef() override {}
45 MCStreamer *llvm::createNullStreamer(MCContext &Context) {
46 return new MCNullStreamer(Context);