Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- SparcTargetStreamer.cpp - Sparc Target Streamer Methods -----------===//
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 provides Sparc specific target streamer methods.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "SparcTargetStreamer.h"
14
#include "SparcInstPrinter.h"
15
#include "llvm/Support/FormattedStream.h"
16
17
using namespace llvm;
18
19
// pin vtable to this file
20
260
SparcTargetStreamer::SparcTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {}
21
22
0
void SparcTargetStreamer::anchor() {}
23
24
SparcTargetAsmStreamer::SparcTargetAsmStreamer(MCStreamer &S,
25
                                               formatted_raw_ostream &OS)
26
235
    : SparcTargetStreamer(S), OS(OS) {}
27
28
4
void SparcTargetAsmStreamer::emitSparcRegisterIgnore(unsigned reg) {
29
4
  OS << "\t.register "
30
4
     << "%" << StringRef(SparcInstPrinter::getRegisterName(reg)).lower()
31
4
     << ", #ignore\n";
32
4
}
33
34
27
void SparcTargetAsmStreamer::emitSparcRegisterScratch(unsigned reg) {
35
27
  OS << "\t.register "
36
27
     << "%" << StringRef(SparcInstPrinter::getRegisterName(reg)).lower()
37
27
     << ", #scratch\n";
38
27
}
39
40
SparcTargetELFStreamer::SparcTargetELFStreamer(MCStreamer &S)
41
25
    : SparcTargetStreamer(S) {}
42
43
0
MCELFStreamer &SparcTargetELFStreamer::getStreamer() {
44
0
  return static_cast<MCELFStreamer &>(Streamer);
45
0
}