Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/MC/MCXCOFFStreamer.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- lib/MC/MCXCOFFStreamer.cpp - XCOFF Object Output -------------------===//
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
// This file assembles .s files and emits XCOFF .o object files.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "llvm/MC/MCXCOFFStreamer.h"
14
#include "llvm/MC/MCAsmBackend.h"
15
#include "llvm/MC/MCCodeEmitter.h"
16
#include "llvm/MC/MCObjectWriter.h"
17
#include "llvm/Support/TargetRegistry.h"
18
19
using namespace llvm;
20
21
MCXCOFFStreamer::MCXCOFFStreamer(MCContext &Context,
22
                                 std::unique_ptr<MCAsmBackend> MAB,
23
                                 std::unique_ptr<MCObjectWriter> OW,
24
                                 std::unique_ptr<MCCodeEmitter> Emitter)
25
    : MCObjectStreamer(Context, std::move(MAB), std::move(OW),
26
2
                       std::move(Emitter)) {}
27
28
bool MCXCOFFStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
29
0
                                          MCSymbolAttr Attribute) {
30
0
  report_fatal_error("Symbol attributes not implemented for XCOFF.");
31
0
}
32
33
void MCXCOFFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
34
0
                                       unsigned ByteAlignment) {
35
0
  report_fatal_error("Emiting common symbols not implemented for XCOFF.");
36
0
}
37
38
void MCXCOFFStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol,
39
                                   uint64_t Size, unsigned ByteAlignment,
40
0
                                   SMLoc Loc) {
41
0
  report_fatal_error("Zero fill not implemented for XCOFF.");
42
0
}
43
44
void MCXCOFFStreamer::EmitInstToData(const MCInst &Inst,
45
0
                                     const MCSubtargetInfo &) {
46
0
  report_fatal_error("Instruction emission not implemented for XCOFF.");
47
0
}
48
49
MCStreamer *llvm::createXCOFFStreamer(MCContext &Context,
50
                                      std::unique_ptr<MCAsmBackend> &&MAB,
51
                                      std::unique_ptr<MCObjectWriter> &&OW,
52
                                      std::unique_ptr<MCCodeEmitter> &&CE,
53
2
                                      bool RelaxAll) {
54
2
  MCXCOFFStreamer *S = new MCXCOFFStreamer(Context, std::move(MAB),
55
2
                                           std::move(OW), std::move(CE));
56
2
  if (RelaxAll)
57
0
    S->getAssembler().setRelaxAll(true);
58
2
  return S;
59
2
}