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 {}
|
|
|
|
|
2020-02-15 10:16:24 +08:00
|
|
|
bool emitSymbolAttribute(MCSymbol *Symbol,
|
2014-03-08 15:02:02 +08:00
|
|
|
MCSymbolAttr Attribute) override {
|
2013-08-09 09:52:03 +08:00
|
|
|
return true;
|
|
|
|
}
|
2009-08-14 07:36:34 +08:00
|
|
|
|
2020-02-15 10:16:24 +08:00
|
|
|
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
2014-03-08 15:02:02 +08:00
|
|
|
unsigned ByteAlignment) override {}
|
2020-02-15 10:16:24 +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 {}
|
2020-02-15 11:21:58 +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);
|
|
|
|
}
|