LCOV - code coverage report
Current view: top level - lib/DebugInfo/PDB/Native - NativeCompilandSymbol.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 9 14 64.3 %
Date: 2017-09-14 15:23:50 Functions: 4 7 57.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- NativeCompilandSymbol.cpp - Native impl for compilands ---*- C++ -*-===//
       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             : #include "llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h"
      11             : 
      12             : #include "llvm/ADT/STLExtras.h"
      13             : 
      14             : namespace llvm {
      15             : namespace pdb {
      16             : 
      17         100 : NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session,
      18             :                                              SymIndexId SymbolId,
      19         100 :                                              DbiModuleDescriptor MI)
      20         100 :     : NativeRawSymbol(Session, SymbolId), Module(MI) {}
      21             : 
      22          50 : PDB_SymType NativeCompilandSymbol::getSymTag() const {
      23          50 :   return PDB_SymType::Compiland;
      24             : }
      25             : 
      26          50 : std::unique_ptr<NativeRawSymbol> NativeCompilandSymbol::clone() const {
      27         150 :   return llvm::make_unique<NativeCompilandSymbol>(Session, SymbolId, Module);
      28             : }
      29             : 
      30           0 : bool NativeCompilandSymbol::isEditAndContinueEnabled() const {
      31           0 :   return Module.hasECInfo();
      32             : }
      33             : 
      34           0 : uint32_t NativeCompilandSymbol::getLexicalParentId() const { return 0; }
      35             : 
      36             : // The usage of getObjFileName for getLibraryName and getModuleName for getName
      37             : // may seem backwards, but it is consistent with DIA, which is what this API
      38             : // was modeled after.  We may rename these methods later to try to eliminate
      39             : // this potential confusion.
      40             : 
      41           0 : std::string NativeCompilandSymbol::getLibraryName() const {
      42           0 :   return Module.getObjFileName();
      43             : }
      44             : 
      45          50 : std::string NativeCompilandSymbol::getName() const {
      46         100 :   return Module.getModuleName();
      47             : }
      48             : 
      49             : } // namespace pdb
      50             : } // namespace llvm

Generated by: LCOV version 1.13