LLVM: lib/Target/LoongArch/MCTargetDesc/LoongArchELFStreamer.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
20
21using namespace llvm;
22
23
31 MAB.getTargetOptions().getABIName()));
32}
33
37
42
47
48
49
50
51
52
53
54
55
56 unsigned EFlags = W.getELFHeaderEFlags();
58 switch (ABI) {
62 break;
66 break;
70 break;
73 }
74 W.setELFHeaderEFlags(EFlags);
75}
76
77namespace {
78class LoongArchELFStreamer : public MCELFStreamer {
79public:
80 LoongArchELFStreamer(MCContext &C, std::unique_ptr MAB,
81 std::unique_ptr MOW,
82 std::unique_ptr MCE)
84};
85}
86
87namespace llvm {
89 std::unique_ptr MAB,
90 std::unique_ptr MOW,
91 std::unique_ptr MCE) {
92 LoongArchELFStreamer *S = new LoongArchELFStreamer(
93 C, std::move(MAB), std::move(MOW), std::move(MCE));
94 return S;
95}
96}
MCELFStreamer & getStreamer()
Definition LoongArchELFStreamer.cpp:34
void finish() override
Definition LoongArchELFStreamer.cpp:43
void emitDirectiveOptionPop() override
Definition LoongArchELFStreamer.cpp:39
void emitDirectiveOptionPush() override
Definition LoongArchELFStreamer.cpp:38
void emitDirectiveOptionNoRelax() override
Definition LoongArchELFStreamer.cpp:41
void emitDirectiveOptionRelax() override
Definition LoongArchELFStreamer.cpp:40
LoongArchTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
Definition LoongArchELFStreamer.cpp:24
LoongArchABI::ABI getTargetABI() const
LoongArchTargetStreamer(MCStreamer &S)
void setTargetABI(LoongArchABI::ABI ABI)
MCAsmBackend & getBackend() const
Context object for machine code objects.
ELFObjectWriter & getWriter()
MCAssembler & getAssembler()
Streaming machine code generation interface.
Generic base class for all target subtargets.
const Triple & getTargetTriple() const
const FeatureBitset & getFeatureBits() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
@ EF_LOONGARCH_ABI_SINGLE_FLOAT
@ EF_LOONGARCH_ABI_DOUBLE_FLOAT
@ EF_LOONGARCH_ABI_SOFT_FLOAT
ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits, StringRef ABIName)
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
MCELFStreamer * createLoongArchELFStreamer(MCContext &C, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > MOW, std::unique_ptr< MCCodeEmitter > MCE)
Definition LoongArchELFStreamer.cpp:88
Implement std::hash so that hash_code can be used in STL containers.