Coverage Report

Created: 2018-06-25 02:00

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/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
  StringRef StrSection;
34
35
  template <class RelTy>
36
  llvm::Optional<llvm::RelocAddrEntry> findAux(const InputSectionBase &Sec,
37
                                               uint64_t Pos,
38
                                               ArrayRef<RelTy> Rels) const;
39
40
public:
41
  explicit LLDDwarfObj(ObjFile<ELFT> *Obj);
42
182
  const llvm::DWARFSection &getInfoSection() const override {
43
182
    return InfoSection;
44
182
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getInfoSection() const
Line
Count
Source
42
14
  const llvm::DWARFSection &getInfoSection() const override {
43
14
    return InfoSection;
44
14
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getInfoSection() const
Line
Count
Source
42
1
  const llvm::DWARFSection &getInfoSection() const override {
43
1
    return InfoSection;
44
1
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getInfoSection() const
Line
Count
Source
42
163
  const llvm::DWARFSection &getInfoSection() const override {
43
163
    return InfoSection;
44
163
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getInfoSection() const
Line
Count
Source
42
4
  const llvm::DWARFSection &getInfoSection() const override {
43
4
    return InfoSection;
44
4
  }
45
183
  const llvm::DWARFSection &getRangeSection() const override {
46
183
    return RangeSection;
47
183
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getRangeSection() const
Line
Count
Source
45
14
  const llvm::DWARFSection &getRangeSection() const override {
46
14
    return RangeSection;
47
14
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getRangeSection() const
Line
Count
Source
45
1
  const llvm::DWARFSection &getRangeSection() const override {
46
1
    return RangeSection;
47
1
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getRangeSection() const
Line
Count
Source
45
164
  const llvm::DWARFSection &getRangeSection() const override {
46
164
    return RangeSection;
47
164
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getRangeSection() const
Line
Count
Source
45
4
  const llvm::DWARFSection &getRangeSection() const override {
46
4
    return RangeSection;
47
4
  }
48
342
  const llvm::DWARFSection &getLineSection() const override {
49
342
    return LineSection;
50
342
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getLineSection() const
Line
Count
Source
48
26
  const llvm::DWARFSection &getLineSection() const override {
49
26
    return LineSection;
50
26
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getLineSection() const
Line
Count
Source
48
2
  const llvm::DWARFSection &getLineSection() const override {
49
2
    return LineSection;
50
2
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getLineSection() const
Line
Count
Source
48
306
  const llvm::DWARFSection &getLineSection() const override {
49
306
    return LineSection;
50
306
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getLineSection() const
Line
Count
Source
48
8
  const llvm::DWARFSection &getLineSection() const override {
49
8
    return LineSection;
50
8
  }
51
1
  StringRef getFileName() const override { return ""; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getFileName() const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getFileName() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getFileName() const
Line
Count
Source
51
1
  StringRef getFileName() const override { return ""; }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getFileName() const
52
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)0, 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, true> >::getCUIndexSection() const
53
171
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getAbbrevSection() const
Line
Count
Source
53
13
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getAbbrevSection() const
Line
Count
Source
53
1
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getAbbrevSection() const
Line
Count
Source
53
153
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getAbbrevSection() const
Line
Count
Source
53
4
  StringRef getAbbrevSection() const override { return AbbrevSection; }
54
183
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getStringSection() const
Line
Count
Source
54
14
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getStringSection() const
Line
Count
Source
54
1
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getStringSection() const
Line
Count
Source
54
164
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getStringSection() const
Line
Count
Source
54
4
  StringRef getStringSection() const override { return StrSection; }
55
11
  StringRef getGnuPubNamesSection() const override {
56
11
    return GnuPubNamesSection;
57
11
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getGnuPubNamesSection() const
Line
Count
Source
55
1
  StringRef getGnuPubNamesSection() const override {
56
1
    return GnuPubNamesSection;
57
1
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getGnuPubNamesSection() const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getGnuPubNamesSection() const
Line
Count
Source
55
10
  StringRef getGnuPubNamesSection() const override {
56
10
    return GnuPubNamesSection;
57
10
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getGnuPubNamesSection() const
58
11
  StringRef getGnuPubTypesSection() const override {
59
11
    return GnuPubTypesSection;
60
11
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getGnuPubTypesSection() const
Line
Count
Source
58
1
  StringRef getGnuPubTypesSection() const override {
59
1
    return GnuPubTypesSection;
60
1
  }
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
58
10
  StringRef getGnuPubTypesSection() const override {
59
10
    return GnuPubTypesSection;
60
10
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getGnuPubTypesSection() const
61
375
  bool isLittleEndian() const override {
62
375
    return ELFT::TargetEndianness == llvm::support::little;
63
375
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::isLittleEndian() const
Line
Count
Source
61
29
  bool isLittleEndian() const override {
62
29
    return ELFT::TargetEndianness == llvm::support::little;
63
29
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::isLittleEndian() const
Line
Count
Source
61
2
  bool isLittleEndian() const override {
62
2
    return ELFT::TargetEndianness == llvm::support::little;
63
2
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::isLittleEndian() const
Line
Count
Source
61
336
  bool isLittleEndian() const override {
62
336
    return ELFT::TargetEndianness == llvm::support::little;
63
336
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::isLittleEndian() const
Line
Count
Source
61
8
  bool isLittleEndian() const override {
62
8
    return ELFT::TargetEndianness == llvm::support::little;
63
8
  }
64
  llvm::Optional<llvm::RelocAddrEntry> find(const llvm::DWARFSection &Sec,
65
                                            uint64_t Pos) const override;
66
};
67
68
} // namespace elf
69
} // namespace lld
70
71
#endif