2009-08-14 07:36:34 +08:00
|
|
|
//===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2009-08-14 07:36:34 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-11-01 23:41:11 +08:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2009-08-14 07:36:34 +08:00
|
|
|
#include "llvm/MC/MCInst.h"
|
2017-06-06 19:49:48 +08:00
|
|
|
#include "llvm/MC/MCStreamer.h"
|
2009-08-14 07:36:34 +08:00
|
|
|
#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
|
|
|
|
/// @{
|
|
|
|
|
2018-11-01 23:41:11 +08:00
|
|
|
bool hasRawTextSupport() const override { return true; }
|
|
|
|
void EmitRawTextImpl(StringRef String) override {}
|
|
|
|
|
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,
|
2018-07-03 01:29:43 +08:00
|
|
|
uint64_t Size = 0, unsigned ByteAlignment = 0,
|
|
|
|
SMLoc Loc = SMLoc()) override {}
|
2014-06-25 12:34:36 +08:00
|
|
|
void EmitGPRel32Value(const MCExpr *Value) override {}
|
2017-02-28 07:10:18 +08:00
|
|
|
void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {}
|
|
|
|
void EmitCOFFSymbolStorageClass(int StorageClass) override {}
|
|
|
|
void EmitCOFFSymbolType(int Type) override {}
|
|
|
|
void EndCOFFSymbolDef() override {}
|
2009-08-14 07:36:34 +08:00
|
|
|
};
|
|
|
|
|
2015-06-23 17:49:53 +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);
|
|
|
|
}
|