Path: blob/main/contrib/llvm-project/llvm/lib/MC/MCNullStreamer.cpp
35234 views
//===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/ADT/StringRef.h"9#include "llvm/MC/MCDirectives.h"10#include "llvm/MC/MCStreamer.h"11#include "llvm/Support/SMLoc.h"12namespace llvm {13class MCContext;14class MCExpr;15class MCSection;16class MCSymbol;17} // namespace llvm1819using namespace llvm;2021namespace {2223class MCNullStreamer : public MCStreamer {24public:25MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}2627/// @name MCStreamer Interface28/// @{2930bool hasRawTextSupport() const override { return true; }31void emitRawTextImpl(StringRef String) override {}3233bool emitSymbolAttribute(MCSymbol *Symbol,34MCSymbolAttr Attribute) override {35return true;36}3738void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,39Align ByteAlignment) override {}40void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,41uint64_t Size = 0, Align ByteAlignment = Align(1),42SMLoc Loc = SMLoc()) override {}43void emitGPRel32Value(const MCExpr *Value) override {}44void beginCOFFSymbolDef(const MCSymbol *Symbol) override {}45void emitCOFFSymbolStorageClass(int StorageClass) override {}46void emitCOFFSymbolType(int Type) override {}47void endCOFFSymbolDef() override {}48void49emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage,50MCSymbolAttr Visibility) override {}51};5253}5455MCStreamer *llvm::createNullStreamer(MCContext &Context) {56return new MCNullStreamer(Context);57}585960