Coverage Report

Created: 2018-08-19 21:11

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/ELF/GdbIndex.h
Line
Count
Source
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
178
  const llvm::DWARFSection &getInfoSection() const override {
43
178
    return InfoSection;
44
178
  }
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
159
  const llvm::DWARFSection &getInfoSection() const override {
43
159
    return InfoSection;
44
159
  }
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
178
  const llvm::DWARFSection &getRangeSection() const override {
46
178
    return RangeSection;
47
178
  }
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
159
  const llvm::DWARFSection &getRangeSection() const override {
46
159
    return RangeSection;
47
159
  }
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
178
  const llvm::DWARFSection &getLineSection() const override {
49
178
    return LineSection;
50
178
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getLineSection() const
Line
Count
Source
48
14
  const llvm::DWARFSection &getLineSection() const override {
49
14
    return LineSection;
50
14
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getLineSection() const
Line
Count
Source
48
1
  const llvm::DWARFSection &getLineSection() const override {
49
1
    return LineSection;
50
1
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getLineSection() const
Line
Count
Source
48
159
  const llvm::DWARFSection &getLineSection() const override {
49
159
    return LineSection;
50
159
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getLineSection() const
Line
Count
Source
48
4
  const llvm::DWARFSection &getLineSection() const override {
49
4
    return LineSection;
50
4
  }
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
177
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getAbbrevSection() const
Line
Count
Source
52
13
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getAbbrevSection() const
Line
Count
Source
52
1
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getAbbrevSection() const
Line
Count
Source
52
159
  StringRef getAbbrevSection() const override { return AbbrevSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getAbbrevSection() const
Line
Count
Source
52
4
  StringRef getAbbrevSection() const override { return AbbrevSection; }
53
178
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getStringSection() const
Line
Count
Source
53
14
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::getStringSection() const
Line
Count
Source
53
1
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::getStringSection() const
Line
Count
Source
53
159
  StringRef getStringSection() const override { return StrSection; }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getStringSection() const
Line
Count
Source
53
4
  StringRef getStringSection() const override { return StrSection; }
54
10
  StringRef getGnuPubNamesSection() const override {
55
10
    return GnuPubNamesSection;
56
10
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getGnuPubNamesSection() const
Line
Count
Source
54
1
  StringRef getGnuPubNamesSection() const override {
55
1
    return GnuPubNamesSection;
56
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
54
9
  StringRef getGnuPubNamesSection() const override {
55
9
    return GnuPubNamesSection;
56
9
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getGnuPubNamesSection() const
57
10
  StringRef getGnuPubTypesSection() const override {
58
10
    return GnuPubTypesSection;
59
10
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::getGnuPubTypesSection() const
Line
Count
Source
57
1
  StringRef getGnuPubTypesSection() const override {
58
1
    return GnuPubTypesSection;
59
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
57
9
  StringRef getGnuPubTypesSection() const override {
58
9
    return GnuPubTypesSection;
59
9
  }
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::getGnuPubTypesSection() const
60
379
  bool isLittleEndian() const override {
61
379
    return ELFT::TargetEndianness == llvm::support::little;
62
379
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::isLittleEndian() const
Line
Count
Source
60
29
  bool isLittleEndian() const override {
61
29
    return ELFT::TargetEndianness == llvm::support::little;
62
29
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::isLittleEndian() const
Line
Count
Source
60
2
  bool isLittleEndian() const override {
61
2
    return ELFT::TargetEndianness == llvm::support::little;
62
2
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::isLittleEndian() const
Line
Count
Source
60
340
  bool isLittleEndian() const override {
61
340
    return ELFT::TargetEndianness == llvm::support::little;
62
340
  }
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::isLittleEndian() const
Line
Count
Source
60
8
  bool isLittleEndian() const override {
61
8
    return ELFT::TargetEndianness == llvm::support::little;
62
8
  }
63
  llvm::Optional<llvm::RelocAddrEntry> find(const llvm::DWARFSection &Sec,
64
                                            uint64_t Pos) const override;
65
};
66
67
} // namespace elf
68
} // namespace lld
69
70
#endif