Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- ARMMCExpr.cpp - ARM specific MC expression classes ----------------===//
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 "ARMMCExpr.h"
10
#include "llvm/MC/MCContext.h"
11
#include "llvm/MC/MCStreamer.h"
12
using namespace llvm;
13
14
#define DEBUG_TYPE "armmcexpr"
15
16
const ARMMCExpr*
17
ARMMCExpr::create(VariantKind Kind, const MCExpr *Expr,
18
56.8k
                       MCContext &Ctx) {
19
56.8k
  return new (Ctx) ARMMCExpr(Kind, Expr);
20
56.8k
}
21
22
3.48k
void ARMMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const {
23
3.48k
  switch (Kind) {
24
3.48k
  
default: 0
llvm_unreachable0
("Invalid kind!");
25
3.48k
  
case VK_ARM_HI16: OS << ":upper16:"; break1.74k
;
26
3.48k
  
case VK_ARM_LO16: OS << ":lower16:"; break1.74k
;
27
3.48k
  }
28
3.48k
29
3.48k
  const MCExpr *Expr = getSubExpr();
30
3.48k
  if (Expr->getKind() != MCExpr::SymbolRef)
31
1.27k
    OS << '(';
32
3.48k
  Expr->print(OS, MAI);
33
3.48k
  if (Expr->getKind() != MCExpr::SymbolRef)
34
1.27k
    OS << ')';
35
3.48k
}
36
37
53.3k
void ARMMCExpr::visitUsedExpr(MCStreamer &Streamer) const {
38
53.3k
  Streamer.visitUsedExpr(*getSubExpr());
39
53.3k
}