LCOV - code coverage report
Current view: top level - lib/CodeGen - MachineModuleInfoImpls.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 6 9 66.7 %
Date: 2018-10-20 13:21:21 Functions: 2 5 40.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- llvm/CodeGen/MachineModuleInfoImpls.cpp ----------------------------===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : //
      10             : // This file implements object-file format specific implementations of
      11             : // MachineModuleInfoImpl.
      12             : //
      13             : //===----------------------------------------------------------------------===//
      14             : 
      15             : #include "llvm/CodeGen/MachineModuleInfoImpls.h"
      16             : #include "llvm/ADT/DenseMap.h"
      17             : #include "llvm/MC/MCSymbol.h"
      18             : 
      19             : using namespace llvm;
      20             : 
      21             : //===----------------------------------------------------------------------===//
      22             : // MachineModuleInfoMachO
      23             : //===----------------------------------------------------------------------===//
      24             : 
      25             : // Out of line virtual method.
      26           0 : void MachineModuleInfoMachO::anchor() {}
      27           0 : void MachineModuleInfoELF::anchor() {}
      28           0 : void MachineModuleInfoCOFF::anchor() {}
      29             : 
      30             : using PairTy = std::pair<MCSymbol *, MachineModuleInfoImpl::StubValueTy>;
      31         779 : static int SortSymbolPair(const PairTy *LHS, const PairTy *RHS) {
      32        1558 :   return LHS->first->getName().compare(RHS->first->getName());
      33             : }
      34             : 
      35       27287 : MachineModuleInfoImpl::SymbolListTy MachineModuleInfoImpl::getSortedStubs(
      36             :     DenseMap<MCSymbol *, MachineModuleInfoImpl::StubValueTy> &Map) {
      37       27287 :   MachineModuleInfoImpl::SymbolListTy List(Map.begin(), Map.end());
      38             : 
      39             :   array_pod_sort(List.begin(), List.end(), SortSymbolPair);
      40             : 
      41       27287 :   Map.clear();
      42       27287 :   return List;
      43             : }

Generated by: LCOV version 1.13