1 //===-- ARMWinCOFFStreamer.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 "ARMMCTargetDesc.h"
11 #include "llvm/MC/MCWinCOFFStreamer.h"
12
13 using namespace llvm;
14
15 namespace {
16 class ARMWinCOFFStreamer : public MCWinCOFFStreamer {
17 public:
ARMWinCOFFStreamer(MCContext & C,MCAsmBackend & AB,MCCodeEmitter & CE,raw_pwrite_stream & OS)18 ARMWinCOFFStreamer(MCContext &C, MCAsmBackend &AB, MCCodeEmitter &CE,
19 raw_pwrite_stream &OS)
20 : MCWinCOFFStreamer(C, AB, CE, OS) {}
21
22 void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
23 void EmitThumbFunc(MCSymbol *Symbol) override;
24 };
25
EmitAssemblerFlag(MCAssemblerFlag Flag)26 void ARMWinCOFFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
27 switch (Flag) {
28 default: llvm_unreachable("not implemented");
29 case MCAF_SyntaxUnified:
30 case MCAF_Code16:
31 break;
32 }
33 }
34
EmitThumbFunc(MCSymbol * Symbol)35 void ARMWinCOFFStreamer::EmitThumbFunc(MCSymbol *Symbol) {
36 getAssembler().setIsThumbFunc(Symbol);
37 }
38 }
39
createARMWinCOFFStreamer(MCContext & Context,MCAsmBackend & MAB,raw_pwrite_stream & OS,MCCodeEmitter * Emitter,bool RelaxAll,bool IncrementalLinkerCompatible)40 MCStreamer *llvm::createARMWinCOFFStreamer(
41 MCContext &Context, MCAsmBackend &MAB, raw_pwrite_stream &OS,
42 MCCodeEmitter *Emitter, bool RelaxAll, bool IncrementalLinkerCompatible) {
43 auto *S = new ARMWinCOFFStreamer(Context, MAB, *Emitter, OS);
44 S->getAssembler().setIncrementalLinkerCompatible(IncrementalLinkerCompatible);
45 return S;
46 }
47
48