Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- llvm/CodeGen/MachineModuleInfoImpls.cpp ----------------------------===//
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 implements object-file format specific implementations of
10
// MachineModuleInfoImpl.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
15
#include "llvm/ADT/DenseMap.h"
16
#include "llvm/MC/MCSymbol.h"
17
18
using namespace llvm;
19
20
//===----------------------------------------------------------------------===//
21
// MachineModuleInfoMachO
22
//===----------------------------------------------------------------------===//
23
24
// Out of line virtual method.
25
0
void MachineModuleInfoMachO::anchor() {}
26
0
void MachineModuleInfoELF::anchor() {}
27
0
void MachineModuleInfoCOFF::anchor() {}
28
29
using PairTy = std::pair<MCSymbol *, MachineModuleInfoImpl::StubValueTy>;
30
4.53k
static int SortSymbolPair(const PairTy *LHS, const PairTy *RHS) {
31
4.53k
  return LHS->first->getName().compare(RHS->first->getName());
32
4.53k
}
33
34
MachineModuleInfoImpl::SymbolListTy MachineModuleInfoImpl::getSortedStubs(
35
30.7k
    DenseMap<MCSymbol *, MachineModuleInfoImpl::StubValueTy> &Map) {
36
30.7k
  MachineModuleInfoImpl::SymbolListTy List(Map.begin(), Map.end());
37
30.7k
38
30.7k
  array_pod_sort(List.begin(), List.end(), SortSymbolPair);
39
30.7k
40
30.7k
  Map.clear();
41
30.7k
  return List;
42
30.7k
}