LLVM 24.0.0git
MCNullStreamer.cpp
Go to the documentation of this file.
1//===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
11#include "llvm/MC/MCStreamer.h"
12namespace llvm {
13class MCContext;
14class MCSymbol;
15} // namespace llvm
16
17using namespace llvm;
18
19namespace {
20
21class MCNullStreamer : public MCStreamer {
22public:
23 MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
24
25 /// @name MCStreamer Interface
26 /// @{
27
28 bool hasRawTextSupport() const override { return true; }
29 void emitRawTextImpl(StringRef String) override {}
30
31 bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override {
32 return true;
33 }
34
35 void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
36 Align ByteAlignment) override {}
37 void emitSubsectionsViaSymbols() override {};
38 void beginCOFFSymbolDef(const MCSymbol *Symbol) override {}
39 void emitCOFFSymbolStorageClass(int StorageClass) override {}
40 void emitCOFFSymbolType(int Type) override {}
41 void endCOFFSymbolDef() override {}
42 void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
43 MCSymbol *CsectSym,
44 Align Alignment) override {}
45 void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol,
47 MCSymbolAttr Visibility) override {}
48 void emitXCOFFExceptDirective(const MCSymbol *Symbol, const MCSymbol *Trap,
49 unsigned Lang, unsigned Reason,
50 unsigned FunctionSize, bool hasDebug) override {
51 }
52 void emitXCOFFRefDirective(const MCSymbol *Symbol) override {}
53 void emitXCOFFCInfoSym(StringRef Name, StringRef Metadata) override {}
54};
55
56} // namespace
57
59 return new MCNullStreamer(Context);
60}
uint64_t uint64_t
DXIL Finalize Linkage
dxil translate DXIL Translate Metadata
Context object for machine code objects.
Definition MCContext.h:84
Streaming machine code generation interface.
Definition MCStreamer.h:221
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition MCSymbol.h:42
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI MCStreamer * createNullStreamer(MCContext &Ctx)
Create a dummy machine code streamer, which does nothing.