Path: blob/main/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.h
35294 views
//===--------- AVRMCELFStreamer.h - AVR subclass of MCELFStreamer ---------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_AVR_MCTARGETDESC_AVRMCELFSTREAMER_H9#define LLVM_LIB_TARGET_AVR_MCTARGETDESC_AVRMCELFSTREAMER_H1011#include "MCTargetDesc/AVRMCExpr.h"12#include "MCTargetDesc/AVRMCTargetDesc.h"13#include "llvm/MC/MCAsmBackend.h"14#include "llvm/MC/MCCodeEmitter.h"15#include "llvm/MC/MCELFStreamer.h"16#include "llvm/MC/MCInstrInfo.h"17#include "llvm/MC/MCObjectWriter.h"1819namespace llvm {2021const int SIZE_LONG = 4;22const int SIZE_WORD = 2;2324class AVRMCELFStreamer : public MCELFStreamer {25std::unique_ptr<MCInstrInfo> MCII;2627public:28AVRMCELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,29std::unique_ptr<MCObjectWriter> OW,30std::unique_ptr<MCCodeEmitter> Emitter)31: MCELFStreamer(Context, std::move(TAB), std::move(OW),32std::move(Emitter)),33MCII(createAVRMCInstrInfo()) {}3435AVRMCELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,36std::unique_ptr<MCObjectWriter> OW,37std::unique_ptr<MCCodeEmitter> Emitter,38MCAssembler *Assembler)39: MCELFStreamer(Context, std::move(TAB), std::move(OW),40std::move(Emitter)),41MCII(createAVRMCInstrInfo()) {}4243void emitValueForModiferKind(44const MCSymbol *Sym, unsigned SizeInBytes, SMLoc Loc = SMLoc(),45AVRMCExpr::VariantKind ModifierKind = AVRMCExpr::VK_AVR_None);46};4748MCStreamer *createAVRELFStreamer(Triple const &TT, MCContext &Context,49std::unique_ptr<MCAsmBackend> MAB,50std::unique_ptr<MCObjectWriter> OW,51std::unique_ptr<MCCodeEmitter> CE);5253} // end namespace llvm5455#endif // LLVM_LIB_TARGET_AVR_MCTARGETDESC_AVRMCELFSTREAMER_H565758