2009-08-14 07:36:34 +08:00
|
|
|
//===- 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/MC/MCStreamer.h"
|
|
|
|
#include "llvm/MC/MCContext.h"
|
|
|
|
#include "llvm/MC/MCInst.h"
|
|
|
|
#include "llvm/MC/MCSectionMachO.h"
|
|
|
|
#include "llvm/MC/MCSymbol.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
class MCNullStreamer : public MCStreamer {
|
|
|
|
public:
|
2014-01-26 14:06:37 +08:00
|
|
|
MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
|
2009-08-14 07:36:34 +08:00
|
|
|
|
|
|
|
/// @name MCStreamer Interface
|
|
|
|
/// @{
|
|
|
|
|
2014-03-08 15:02:02 +08:00
|
|
|
bool EmitSymbolAttribute(MCSymbol *Symbol,
|
|
|
|
MCSymbolAttr Attribute) override {
|
2013-08-09 09:52:03 +08:00
|
|
|
return true;
|
|
|
|
}
|
2009-08-14 07:36:34 +08:00
|
|
|
|
2014-03-08 15:02:02 +08:00
|
|
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
|
|
|
unsigned ByteAlignment) override {}
|
2015-05-22 03:20:38 +08:00
|
|
|
void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
|
2014-03-08 15:02:02 +08:00
|
|
|
uint64_t Size = 0, unsigned ByteAlignment = 0) override {}
|
2014-06-25 12:34:36 +08:00
|
|
|
void EmitGPRel32Value(const MCExpr *Value) override {}
|
2009-08-14 07:36:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2012-05-11 09:41:30 +08:00
|
|
|
|
2009-08-14 07:36:34 +08:00
|
|
|
MCStreamer *llvm::createNullStreamer(MCContext &Context) {
|
|
|
|
return new MCNullStreamer(Context);
|
|
|
|
}
|