Coverage Report

Created: 2017-10-03 07:32

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/ELF/GdbIndex.h
Line
Count
Source (jump to first uncovered line)
1
//===- GdbIndex.h --------------------------------------------*- C++ -*-===//
2
//
3
//                             The LLVM Linker
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===-------------------------------------------------------------------===//
9
10
#ifndef LLD_ELF_GDB_INDEX_H
11
#define LLD_ELF_GDB_INDEX_H
12
13
#include "InputFiles.h"
14
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
15
#include "llvm/Object/ELF.h"
16
17
namespace lld {
18
namespace elf {
19
20
class InputSection;
21
22
struct LLDDWARFSection final : public llvm::DWARFSection {
23
  InputSectionBase *Sec = nullptr;
24
};
25
26
template <class ELFT> class LLDDwarfObj final : public llvm::DWARFObject {
27
  LLDDWARFSection InfoSection;
28
  LLDDWARFSection RangeSection;
29
  LLDDWARFSection LineSection;
30
  StringRef AbbrevSection;
31
  StringRef GnuPubNamesSection;
32
  StringRef GnuPubTypesSection;
33
34
  template <class RelTy>
35
  llvm::Optional<llvm::RelocAddrEntry> findAux(const InputSectionBase &Sec,
36
                                               uint64_t Pos,
37
                                               ArrayRef<RelTy> Rels) const;
38
39
public:
40
  explicit LLDDwarfObj(ObjFile<ELFT> *Obj);
41
18
  const llvm::DWARFSection &getInfoSection() const override {
42
18
    return InfoSection;
43
18
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getInfoSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getInfoSection() const
Line
Count
Source
41
16
  const llvm::DWARFSection &getInfoSection() const override {
42
16
    return InfoSection;
43
16
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getInfoSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getInfoSection() const
Line
Count
Source
41
2
  const llvm::DWARFSection &getInfoSection() const override {
42
2
    return InfoSection;
43
2
  }
44
17
  const llvm::DWARFSection &getRangeSection() const override {
45
17
    return RangeSection;
46
17
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getRangeSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getRangeSection() const
Line
Count
Source
44
15
  const llvm::DWARFSection &getRangeSection() const override {
45
15
    return RangeSection;
46
15
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getRangeSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getRangeSection() const
Line
Count
Source
44
2
  const llvm::DWARFSection &getRangeSection() const override {
45
2
    return RangeSection;
46
2
  }
47
139
  const llvm::DWARFSection &getLineSection() const override {
48
139
    return LineSection;
49
139
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getLineSection() const
Line
Count
Source
47
12
  const llvm::DWARFSection &getLineSection() const override {
48
12
    return LineSection;
49
12
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getLineSection() const
Line
Count
Source
47
1
  const llvm::DWARFSection &getLineSection() const override {
48
1
    return LineSection;
49
1
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getLineSection() const
Line
Count
Source
47
125
  const llvm::DWARFSection &getLineSection() const override {
48
125
    return LineSection;
49
125
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getLineSection() const
Line
Count
Source
47
1
  const llvm::DWARFSection &getLineSection() const override {
48
1
    return LineSection;
49
1
  }
50
0
  StringRef getCUIndexSection() const override { return ""; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getCUIndexSection() const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getCUIndexSection() const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getCUIndexSection() const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getCUIndexSection() const
51
8
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getAbbrevSection() const
Line
Count
Source
51
7
  StringRef getAbbrevSection() const override { return AbbrevSection; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getAbbrevSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getAbbrevSection() const
Line
Count
Source
51
1
  StringRef getAbbrevSection() const override { return AbbrevSection; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getAbbrevSection() const
52
17
  StringRef getStringSection() const override { return ""; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getStringSection() const
Line
Count
Source
52
15
  StringRef getStringSection() const override { return ""; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getStringSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getStringSection() const
Line
Count
Source
52
2
  StringRef getStringSection() const override { return ""; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getStringSection() const
53
8
  StringRef getGnuPubNamesSection() const override {
54
8
    return GnuPubNamesSection;
55
8
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getGnuPubNamesSection() const
Line
Count
Source
53
7
  StringRef getGnuPubNamesSection() const override {
54
7
    return GnuPubNamesSection;
55
7
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getGnuPubNamesSection() const
Line
Count
Source
53
1
  StringRef getGnuPubNamesSection() const override {
54
1
    return GnuPubNamesSection;
55
1
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getGnuPubNamesSection() const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getGnuPubNamesSection() const
56
9
  StringRef getGnuPubTypesSection() const override {
57
9
    return GnuPubTypesSection;
58
9
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getGnuPubTypesSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getGnuPubTypesSection() const
Line
Count
Source
56
8
  StringRef getGnuPubTypesSection() const override {
57
8
    return GnuPubTypesSection;
58
8
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getGnuPubTypesSection() const
Line
Count
Source
56
1
  StringRef getGnuPubTypesSection() const override {
57
1
    return GnuPubTypesSection;
58
1
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getGnuPubTypesSection() const
59
26
  bool isLittleEndian() const override {
60
26
    return ELFT::TargetEndianness == llvm::support::little;
61
26
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::isLittleEndian() const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::isLittleEndian() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::isLittleEndian() const
Line
Count
Source
59
23
  bool isLittleEndian() const override {
60
23
    return ELFT::TargetEndianness == llvm::support::little;
61
23
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::isLittleEndian() const
Line
Count
Source
59
3
  bool isLittleEndian() const override {
60
3
    return ELFT::TargetEndianness == llvm::support::little;
61
3
  }
62
  llvm::Optional<llvm::RelocAddrEntry> find(const llvm::DWARFSection &Sec,
63
                                            uint64_t Pos) const override;
64
};
65
66
} // namespace elf
67
} // namespace lld
68
69
#endif