Use %ull here.
[llvm/stm8.git] / lib / MC / MCNullStreamer.cpp
blob08ddf01d1a36ad671bfb5444e11d256a64cf693f
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 //===----------------------------------------------------------------------===//
10 #include "llvm/MC/MCStreamer.h"
12 #include "llvm/MC/MCContext.h"
13 #include "llvm/MC/MCInst.h"
14 #include "llvm/MC/MCSectionMachO.h"
15 #include "llvm/MC/MCSymbol.h"
17 using namespace llvm;
19 namespace {
21 class MCNullStreamer : public MCStreamer {
22 public:
23 MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
25 /// @name MCStreamer Interface
26 /// @{
28 virtual void InitSections() {
31 virtual void ChangeSection(const MCSection *Section) {
34 virtual void EmitLabel(MCSymbol *Symbol) {
35 assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
36 assert(getCurrentSection() && "Cannot emit before setting section!");
37 Symbol->setSection(*getCurrentSection());
40 virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
41 virtual void EmitThumbFunc(MCSymbol *Func) {}
43 virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {}
44 virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol){}
45 virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
46 const MCSymbol *LastLabel,
47 const MCSymbol *Label) {}
49 virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute){}
51 virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
53 virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) {}
54 virtual void EmitCOFFSymbolStorageClass(int StorageClass) {}
55 virtual void EmitCOFFSymbolType(int Type) {}
56 virtual void EndCOFFSymbolDef() {}
58 virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {}
59 virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
60 unsigned ByteAlignment) {}
61 virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) {}
63 virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
64 unsigned Size = 0, unsigned ByteAlignment = 0) {}
65 virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
66 uint64_t Size, unsigned ByteAlignment) {}
67 virtual void EmitBytes(StringRef Data, unsigned AddrSpace) {}
69 virtual void EmitValueImpl(const MCExpr *Value, unsigned Size,
70 bool isPCRel, unsigned AddrSpace) {}
71 virtual void EmitULEB128Value(const MCExpr *Value,
72 unsigned AddrSpace = 0) {}
73 virtual void EmitSLEB128Value(const MCExpr *Value,
74 unsigned AddrSpace = 0) {}
75 virtual void EmitGPRel32Value(const MCExpr *Value) {}
76 virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
77 unsigned ValueSize = 1,
78 unsigned MaxBytesToEmit = 0) {}
80 virtual void EmitCodeAlignment(unsigned ByteAlignment,
81 unsigned MaxBytesToEmit = 0) {}
83 virtual void EmitValueToOffset(const MCExpr *Offset,
84 unsigned char Value = 0) {}
86 virtual void EmitFileDirective(StringRef Filename) {}
87 virtual bool EmitDwarfFileDirective(unsigned FileNo,StringRef Filename) {
88 return false;
90 virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
91 unsigned Column, unsigned Flags,
92 unsigned Isa, unsigned Discriminator) {}
93 virtual void EmitInstruction(const MCInst &Inst) {}
95 virtual void Finish() {}
97 /// @}
102 MCStreamer *llvm::createNullStreamer(MCContext &Context) {
103 return new MCNullStreamer(Context);