LLVM
16.0.0git
lib
Target
AVR
MCTargetDesc
AVRMCELFStreamer.h
Go to the documentation of this file.
1
//===--------- AVRMCELFStreamer.h - AVR subclass of MCELFStreamer ---------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_LIB_TARGET_AVR_MCTARGETDESC_AVRMCELFSTREAMER_H
10
#define LLVM_LIB_TARGET_AVR_MCTARGETDESC_AVRMCELFSTREAMER_H
11
12
#include "
MCTargetDesc/AVRMCExpr.h
"
13
#include "
MCTargetDesc/AVRMCTargetDesc.h
"
14
#include "
llvm/MC/MCAsmBackend.h
"
15
#include "
llvm/MC/MCCodeEmitter.h
"
16
#include "
llvm/MC/MCELFStreamer.h
"
17
#include "
llvm/MC/MCInstrInfo.h
"
18
#include "
llvm/MC/MCObjectWriter.h
"
19
20
namespace
llvm
{
21
22
const
int
SIZE_LONG
= 4;
23
const
int
SIZE_WORD
= 2;
24
25
class
AVRMCELFStreamer
:
public
MCELFStreamer
{
26
std::unique_ptr<MCInstrInfo> MCII;
27
28
public
:
29
AVRMCELFStreamer
(
MCContext
&Context, std::unique_ptr<MCAsmBackend> TAB,
30
std::unique_ptr<MCObjectWriter> OW,
31
std::unique_ptr<MCCodeEmitter> Emitter)
32
:
MCELFStreamer
(
Context
,
std
::
move
(TAB),
std
::
move
(OW),
33
std
::
move
(Emitter)),
34
MCII(
createAVRMCInstrInfo
()) {}
35
36
AVRMCELFStreamer
(
MCContext
&Context, std::unique_ptr<MCAsmBackend> TAB,
37
std::unique_ptr<MCObjectWriter> OW,
38
std::unique_ptr<MCCodeEmitter> Emitter,
39
MCAssembler
*Assembler)
40
:
MCELFStreamer
(
Context
,
std
::
move
(TAB),
std
::
move
(OW),
41
std
::
move
(Emitter)),
42
MCII(
createAVRMCInstrInfo
()) {}
43
44
void
emitValueForModiferKind
(
45
const
MCSymbol
*Sym,
unsigned
SizeInBytes,
SMLoc
Loc =
SMLoc
(),
46
AVRMCExpr::VariantKind
ModifierKind =
AVRMCExpr::VK_AVR_None
);
47
};
48
49
MCStreamer *
createAVRELFStreamer
(Triple
const
&TT, MCContext &
Context
,
50
std::unique_ptr<MCAsmBackend> MAB,
51
std::unique_ptr<MCObjectWriter> OW,
52
std::unique_ptr<MCCodeEmitter> CE);
53
54
}
// end namespace llvm
55
56
#endif // LLVM_LIB_TARGET_AVR_MCTARGETDESC_AVRMCELFSTREAMER_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:41
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:76
MCCodeEmitter.h
llvm::AVRMCELFStreamer::AVRMCELFStreamer
AVRMCELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Definition:
AVRMCELFStreamer.h:29
MCELFStreamer.h
AVRMCExpr.h
Context
LLVMContext & Context
Definition:
NVVMIntrRange.cpp:66
llvm::MCELFStreamer
Definition:
MCELFStreamer.h:31
MCAsmBackend.h
llvm::SMLoc
Represents a location in source code.
Definition:
SMLoc.h:23
llvm::AVRMCExpr::VK_AVR_None
@ VK_AVR_None
Definition:
AVRMCExpr.h:23
llvm::AVRMCELFStreamer::emitValueForModiferKind
void emitValueForModiferKind(const MCSymbol *Sym, unsigned SizeInBytes, SMLoc Loc=SMLoc(), AVRMCExpr::VariantKind ModifierKind=AVRMCExpr::VK_AVR_None)
Definition:
AVRMCELFStreamer.cpp:23
MCInstrInfo.h
llvm::SIZE_WORD
const int SIZE_WORD
Definition:
AVRMCELFStreamer.h:23
llvm::createAVRELFStreamer
MCStreamer * createAVRELFStreamer(Triple const &TT, MCContext &Context, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > CE)
Definition:
AVRMCELFStreamer.cpp:44
llvm::MCAssembler
Definition:
MCAssembler.h:73
llvm::createAVRMCInstrInfo
MCInstrInfo * createAVRMCInstrInfo()
Definition:
AVRMCTargetDesc.cpp:41
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition:
STLExtras.h:1676
llvm::AVRMCELFStreamer
Definition:
AVRMCELFStreamer.h:25
llvm::SIZE_LONG
const int SIZE_LONG
Definition:
AVRMCELFStreamer.h:22
AVRMCTargetDesc.h
llvm::AVRMCELFStreamer::AVRMCELFStreamer
AVRMCELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter, MCAssembler *Assembler)
Definition:
AVRMCELFStreamer.h:36
MCObjectWriter.h
std
Definition:
BitVector.h:851
llvm::AVRMCExpr::VariantKind
VariantKind
Specifies the type of an expression.
Definition:
AVRMCExpr.h:22
Generated on Sun Aug 14 2022 06:36:33 for LLVM by
1.8.17