Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / MC / MCNullStreamer.cpp
blob7d5a823b389abccfe075f8e98699ce3f85abf91c
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 //===----------------------------------------------------------------------===//
9 #include "llvm/ADT/StringRef.h"
10 #include "llvm/MC/MCDirectives.h"
11 #include "llvm/MC/MCStreamer.h"
12 #include "llvm/Support/SMLoc.h"
13 namespace llvm {
14 class MCContext;
15 class MCExpr;
16 class MCSection;
17 class MCSymbol;
18 } // namespace llvm
20 using namespace llvm;
22 namespace {
24 class MCNullStreamer : public MCStreamer {
25 public:
26 MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
28 /// @name MCStreamer Interface
29 /// @{
31 bool hasRawTextSupport() const override { return true; }
32 void emitRawTextImpl(StringRef String) override {}
34 bool emitSymbolAttribute(MCSymbol *Symbol,
35 MCSymbolAttr Attribute) override {
36 return true;
39 void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
40 Align ByteAlignment) override {}
41 void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
42 uint64_t Size = 0, Align ByteAlignment = Align(1),
43 SMLoc Loc = SMLoc()) override {}
44 void emitGPRel32Value(const MCExpr *Value) override {}
45 void beginCOFFSymbolDef(const MCSymbol *Symbol) override {}
46 void emitCOFFSymbolStorageClass(int StorageClass) override {}
47 void emitCOFFSymbolType(int Type) override {}
48 void endCOFFSymbolDef() override {}
49 void
50 emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage,
51 MCSymbolAttr Visibility) override {}
56 MCStreamer *llvm::createNullStreamer(MCContext &Context) {
57 return new MCNullStreamer(Context);