Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- ARMWinCOFFStreamer.cpp - ARM Target WinCOFF Streamer ----*- C++ -*-===//
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
#include "ARMMCTargetDesc.h"
10
#include "llvm/MC/MCAsmBackend.h"
11
#include "llvm/MC/MCCodeEmitter.h"
12
#include "llvm/MC/MCObjectWriter.h"
13
#include "llvm/MC/MCWinCOFFStreamer.h"
14
15
using namespace llvm;
16
17
namespace {
18
class ARMWinCOFFStreamer : public MCWinCOFFStreamer {
19
public:
20
  ARMWinCOFFStreamer(MCContext &C, std::unique_ptr<MCAsmBackend> AB,
21
                     std::unique_ptr<MCCodeEmitter> CE,
22
                     std::unique_ptr<MCObjectWriter> OW)
23
28
      : MCWinCOFFStreamer(C, std::move(AB), std::move(CE), std::move(OW)) {}
24
25
  void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
26
  void EmitThumbFunc(MCSymbol *Symbol) override;
27
  void FinishImpl() override;
28
};
29
30
31
void ARMWinCOFFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
31
31
  switch (Flag) {
32
31
  
default: 0
llvm_unreachable0
("not implemented");
33
31
  case MCAF_SyntaxUnified:
34
31
  case MCAF_Code16:
35
31
    break;
36
31
  }
37
31
}
38
39
34
void ARMWinCOFFStreamer::EmitThumbFunc(MCSymbol *Symbol) {
40
34
  getAssembler().setIsThumbFunc(Symbol);
41
34
}
42
43
28
void ARMWinCOFFStreamer::FinishImpl() {
44
28
  EmitFrames(nullptr);
45
28
46
28
  MCWinCOFFStreamer::FinishImpl();
47
28
}
48
}
49
50
MCStreamer *llvm::createARMWinCOFFStreamer(
51
    MCContext &Context, std::unique_ptr<MCAsmBackend> &&MAB,
52
    std::unique_ptr<MCObjectWriter> &&OW,
53
    std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll,
54
28
    bool IncrementalLinkerCompatible) {
55
28
  auto *S = new ARMWinCOFFStreamer(Context, std::move(MAB), std::move(Emitter),
56
28
                                   std::move(OW));
57
28
  S->getAssembler().setIncrementalLinkerCompatible(IncrementalLinkerCompatible);
58
28
  return S;
59
28
}
60