forked from OSchip/llvm-project
51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
//===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "llvm/MC/MCInst.h"
|
|
#include "llvm/MC/MCStreamer.h"
|
|
#include "llvm/MC/MCSymbol.h"
|
|
|
|
using namespace llvm;
|
|
|
|
namespace {
|
|
|
|
class MCNullStreamer : public MCStreamer {
|
|
public:
|
|
MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
|
|
|
|
/// @name MCStreamer Interface
|
|
/// @{
|
|
|
|
bool hasRawTextSupport() const override { return true; }
|
|
void EmitRawTextImpl(StringRef String) override {}
|
|
|
|
bool EmitSymbolAttribute(MCSymbol *Symbol,
|
|
MCSymbolAttr Attribute) override {
|
|
return true;
|
|
}
|
|
|
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
|
unsigned ByteAlignment) override {}
|
|
void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
|
|
uint64_t Size = 0, unsigned ByteAlignment = 0,
|
|
SMLoc Loc = SMLoc()) override {}
|
|
void EmitGPRel32Value(const MCExpr *Value) override {}
|
|
void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {}
|
|
void EmitCOFFSymbolStorageClass(int StorageClass) override {}
|
|
void EmitCOFFSymbolType(int Type) override {}
|
|
void EndCOFFSymbolDef() override {}
|
|
};
|
|
|
|
}
|
|
|
|
MCStreamer *llvm::createNullStreamer(MCContext &Context) {
|
|
return new MCNullStreamer(Context);
|
|
}
|