1 //===-- AArch64WinCOFFStreamer.cpp - ARM Target WinCOFF Streamer ----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "AArch64WinCOFFStreamer.h"
11 #include "llvm/MC/MCAsmBackend.h"
12 #include "llvm/MC/MCCodeEmitter.h"
13 #include "llvm/MC/MCObjectWriter.h"
14
15 using namespace llvm;
16
17 namespace {
18
19 class AArch64WinCOFFStreamer : public MCWinCOFFStreamer {
20 public:
21 friend class AArch64TargetWinCOFFStreamer;
22
AArch64WinCOFFStreamer(MCContext & C,std::unique_ptr<MCAsmBackend> AB,std::unique_ptr<MCCodeEmitter> CE,std::unique_ptr<MCObjectWriter> OW)23 AArch64WinCOFFStreamer(MCContext &C, std::unique_ptr<MCAsmBackend> AB,
24 std::unique_ptr<MCCodeEmitter> CE,
25 std::unique_ptr<MCObjectWriter> OW)
26 : MCWinCOFFStreamer(C, std::move(AB), std::move(CE), std::move(OW)) {}
27
28 void FinishImpl() override;
29 };
30
FinishImpl()31 void AArch64WinCOFFStreamer::FinishImpl() {
32 EmitFrames(nullptr);
33
34 MCWinCOFFStreamer::FinishImpl();
35 }
36 } // end anonymous namespace
37
38 namespace llvm {
createAArch64WinCOFFStreamer(MCContext & Context,std::unique_ptr<MCAsmBackend> MAB,std::unique_ptr<MCObjectWriter> OW,std::unique_ptr<MCCodeEmitter> Emitter,bool RelaxAll,bool IncrementalLinkerCompatible)39 MCWinCOFFStreamer *createAArch64WinCOFFStreamer(
40 MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
41 std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter,
42 bool RelaxAll, bool IncrementalLinkerCompatible) {
43 auto *S = new AArch64WinCOFFStreamer(Context, std::move(MAB),
44 std::move(Emitter), std::move(OW));
45 S->getAssembler().setIncrementalLinkerCompatible(IncrementalLinkerCompatible);
46 return S;
47 }
48
49 } // end llvm namespace
50