llvm-6502/lib/MC/MCNullStreamer.cpp
Rafael Espindola 91c39aa628 Merge the used symbol scanning of MCObjectStreamer and RecordStreamer.
This completes the refactoring of RecordStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211727 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25 18:37:33 +00:00

45 lines
1.3 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/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:
MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
/// @name MCStreamer Interface
/// @{
bool EmitSymbolAttribute(MCSymbol *Symbol,
MCSymbolAttr Attribute) override {
return true;
}
void EmitCOFFSecRel32(MCSymbol const *Symbol) override {}
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) override {}
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = nullptr,
uint64_t Size = 0, unsigned ByteAlignment = 0) override {}
void EmitGPRel32Value(const MCExpr *Value) override {}
};
}
MCStreamer *llvm::createNullStreamer(MCContext &Context) {
return new MCNullStreamer(Context);
}