LLVM  7.0.0
MCNullStreamer.cpp
Go to the documentation of this file.
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/MCInst.h"
11 #include "llvm/MC/MCStreamer.h"
12 #include "llvm/MC/MCSymbol.h"
13 
14 using namespace llvm;
15 
16 namespace {
17 
18  class MCNullStreamer : public MCStreamer {
19  public:
20  MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
21 
22  /// @name MCStreamer Interface
23  /// @{
24 
25  bool EmitSymbolAttribute(MCSymbol *Symbol,
26  MCSymbolAttr Attribute) override {
27  return true;
28  }
29 
30  void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
31  unsigned ByteAlignment) override {}
32  void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
33  uint64_t Size = 0, unsigned ByteAlignment = 0,
34  SMLoc Loc = SMLoc()) override {}
35  void EmitGPRel32Value(const MCExpr *Value) override {}
36  void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {}
37  void EmitCOFFSymbolStorageClass(int StorageClass) override {}
38  void EmitCOFFSymbolType(int Type) override {}
39  void EndCOFFSymbolDef() override {}
40  };
41 
42 }
43 
45  return new MCNullStreamer(Context);
46 }
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:39
LLVMContext & Context
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
MCStreamer * createNullStreamer(MCContext &Ctx)
Create a dummy machine code streamer, which does nothing.
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:36
Context object for machine code objects.
Definition: MCContext.h:63
Streaming machine code generation interface.
Definition: MCStreamer.h:183
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
MCSymbolAttr
Definition: MCDirectives.h:19
LLVM Value Representation.
Definition: Value.h:73
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
Represents a location in source code.
Definition: SMLoc.h:24