Coverage Report

Created: 2017-09-19 22:28

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/ELF/GdbIndex.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- GdbIndex.cpp -------------------------------------------------------===//
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
// The -gdb-index option instructs the linker to emit a .gdb_index section.
11
// The section contains information to make gdb startup faster.
12
// The format of the section is described at
13
// https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html.
14
//
15
//===----------------------------------------------------------------------===//
16
17
#include "GdbIndex.h"
18
#include "Memory.h"
19
#include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h"
20
#include "llvm/Object/ELFObjectFile.h"
21
22
using namespace llvm;
23
using namespace llvm::object;
24
using namespace lld;
25
using namespace lld::elf;
26
27
6
std::pair<bool, GdbSymbol *> GdbHashTab::add(uint32_t Hash, size_t Offset) {
28
6
  GdbSymbol *&Sym = Map[Offset];
29
6
  if (Sym)
30
2
    return {false, Sym};
31
4
  Sym = make<GdbSymbol>(Hash, Offset);
32
4
  return {true, Sym};
33
4
}
34
35
9
void GdbHashTab::finalizeContents() {
36
9
  uint32_t Size = std::max<uint32_t>(1024, NextPowerOf2(Map.size() * 4 / 3));
37
9
  uint32_t Mask = Size - 1;
38
9
  Table.resize(Size);
39
9
40
4
  for (auto &P : Map) {
41
4
    GdbSymbol *Sym = P.second;
42
4
    uint32_t I = Sym->NameHash & Mask;
43
4
    uint32_t Step = ((Sym->NameHash * 17) & Mask) | 1;
44
4
45
4
    while (Table[I])
46
0
      I = (I + Step) & Mask;
47
4
    Table[I] = Sym;
48
4
  }
49
9
}
50
51
template <class ELFT>
52
129
LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) : Obj(Obj) {
53
741
  for (InputSectionBase *Sec : Obj->getSections()) {
54
741
    if (!Sec)
55
509
      continue;
56
232
    
if (LLDDWARFSection *232
M232
= StringSwitch<LLDDWARFSection *>(Sec->Name)
57
232
                                 .Case(".debug_info", &InfoSection)
58
232
                                 .Case(".debug_ranges", &RangeSection)
59
232
                                 .Case(".debug_line", &LineSection)
60
19
                                 .Default(nullptr)) {
61
19
      M->Data = toStringRef(Sec->Data);
62
19
      M->Sec = Sec;
63
19
      continue;
64
19
    }
65
213
    
if (213
Sec->Name == ".debug_abbrev"213
)
66
8
      AbbrevSection = toStringRef(Sec->Data);
67
205
    else 
if (205
Sec->Name == ".debug_gnu_pubnames"205
)
68
2
      GnuPubNamesSection = toStringRef(Sec->Data);
69
203
    else 
if (203
Sec->Name == ".debug_gnu_pubtypes"203
)
70
3
      GnuPubTypesSection = toStringRef(Sec->Data);
71
741
  }
72
129
}
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::LLDDwarfObj(lld::elf::ObjFile<llvm::object::ELFType<(llvm::support::endianness)1, false> >*)
Line
Count
Source
52
11
LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) : Obj(Obj) {
53
62
  for (InputSectionBase *Sec : Obj->getSections()) {
54
62
    if (!Sec)
55
47
      continue;
56
15
    
if (LLDDWARFSection *15
M15
= StringSwitch<LLDDWARFSection *>(Sec->Name)
57
15
                                 .Case(".debug_info", &InfoSection)
58
15
                                 .Case(".debug_ranges", &RangeSection)
59
15
                                 .Case(".debug_line", &LineSection)
60
2
                                 .Default(nullptr)) {
61
2
      M->Data = toStringRef(Sec->Data);
62
2
      M->Sec = Sec;
63
2
      continue;
64
2
    }
65
13
    
if (13
Sec->Name == ".debug_abbrev"13
)
66
0
      AbbrevSection = toStringRef(Sec->Data);
67
13
    else 
if (13
Sec->Name == ".debug_gnu_pubnames"13
)
68
0
      GnuPubNamesSection = toStringRef(Sec->Data);
69
13
    else 
if (13
Sec->Name == ".debug_gnu_pubtypes"13
)
70
0
      GnuPubTypesSection = toStringRef(Sec->Data);
71
62
  }
72
11
}
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::LLDDwarfObj(lld::elf::ObjFile<llvm::object::ELFType<(llvm::support::endianness)0, false> >*)
Line
Count
Source
52
1
LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) : Obj(Obj) {
53
9
  for (InputSectionBase *Sec : Obj->getSections()) {
54
9
    if (!Sec)
55
4
      continue;
56
5
    
if (LLDDWARFSection *5
M5
= StringSwitch<LLDDWARFSection *>(Sec->Name)
57
5
                                 .Case(".debug_info", &InfoSection)
58
5
                                 .Case(".debug_ranges", &RangeSection)
59
5
                                 .Case(".debug_line", &LineSection)
60
0
                                 .Default(nullptr)) {
61
0
      M->Data = toStringRef(Sec->Data);
62
0
      M->Sec = Sec;
63
0
      continue;
64
0
    }
65
5
    
if (5
Sec->Name == ".debug_abbrev"5
)
66
0
      AbbrevSection = toStringRef(Sec->Data);
67
5
    else 
if (5
Sec->Name == ".debug_gnu_pubnames"5
)
68
0
      GnuPubNamesSection = toStringRef(Sec->Data);
69
5
    else 
if (5
Sec->Name == ".debug_gnu_pubtypes"5
)
70
0
      GnuPubTypesSection = toStringRef(Sec->Data);
71
9
  }
72
1
}
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::LLDDwarfObj(lld::elf::ObjFile<llvm::object::ELFType<(llvm::support::endianness)1, true> >*)
Line
Count
Source
52
116
LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) : Obj(Obj) {
53
665
  for (InputSectionBase *Sec : Obj->getSections()) {
54
665
    if (!Sec)
55
454
      continue;
56
211
    
if (LLDDWARFSection *211
M211
= StringSwitch<LLDDWARFSection *>(Sec->Name)
57
211
                                 .Case(".debug_info", &InfoSection)
58
211
                                 .Case(".debug_ranges", &RangeSection)
59
211
                                 .Case(".debug_line", &LineSection)
60
17
                                 .Default(nullptr)) {
61
17
      M->Data = toStringRef(Sec->Data);
62
17
      M->Sec = Sec;
63
17
      continue;
64
17
    }
65
194
    
if (194
Sec->Name == ".debug_abbrev"194
)
66
8
      AbbrevSection = toStringRef(Sec->Data);
67
186
    else 
if (186
Sec->Name == ".debug_gnu_pubnames"186
)
68
2
      GnuPubNamesSection = toStringRef(Sec->Data);
69
184
    else 
if (184
Sec->Name == ".debug_gnu_pubtypes"184
)
70
3
      GnuPubTypesSection = toStringRef(Sec->Data);
71
665
  }
72
116
}
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::LLDDwarfObj(lld::elf::ObjFile<llvm::object::ELFType<(llvm::support::endianness)0, true> >*)
Line
Count
Source
52
1
LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) : Obj(Obj) {
53
5
  for (InputSectionBase *Sec : Obj->getSections()) {
54
5
    if (!Sec)
55
4
      continue;
56
1
    
if (LLDDWARFSection *1
M1
= StringSwitch<LLDDWARFSection *>(Sec->Name)
57
1
                                 .Case(".debug_info", &InfoSection)
58
1
                                 .Case(".debug_ranges", &RangeSection)
59
1
                                 .Case(".debug_line", &LineSection)
60
0
                                 .Default(nullptr)) {
61
0
      M->Data = toStringRef(Sec->Data);
62
0
      M->Sec = Sec;
63
0
      continue;
64
0
    }
65
1
    
if (1
Sec->Name == ".debug_abbrev"1
)
66
0
      AbbrevSection = toStringRef(Sec->Data);
67
1
    else 
if (1
Sec->Name == ".debug_gnu_pubnames"1
)
68
0
      GnuPubNamesSection = toStringRef(Sec->Data);
69
1
    else 
if (1
Sec->Name == ".debug_gnu_pubtypes"1
)
70
0
      GnuPubTypesSection = toStringRef(Sec->Data);
71
5
  }
72
1
}
73
74
// Find if there is a relocation at Pos in Sec.  The code is a bit
75
// more complicated than usual because we need to pass a section index
76
// to llvm since it has no idea about InputSection.
77
template <class ELFT>
78
template <class RelTy>
79
Optional<RelocAddrEntry>
80
LLDDwarfObj<ELFT>::findAux(const InputSectionBase &Sec, uint64_t Pos,
81
45
                           ArrayRef<RelTy> Rels) const {
82
45
  auto It = std::lower_bound(
83
45
      Rels.begin(), Rels.end(), Pos,
84
76
      [](const RelTy &A, uint64_t B) { return A.r_offset < B; });
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> const&, unsigned long long) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> const&, unsigned long long) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> const&, unsigned long long) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> const&, unsigned long long) const
llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> const&, unsigned long long) const
Line
Count
Source
84
76
      [](const RelTy &A, uint64_t B) { return A.r_offset < B; });
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> const&, unsigned long long) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> const&, unsigned long long) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >) const::'lambda'(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> const&, unsigned long long)::operator()(llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> const&, unsigned long long) const
85
45
  if (
It == Rels.end() || 45
It->r_offset != Pos31
)
86
19
    return None;
87
26
  const RelTy &Rel = *It;
88
26
89
26
  const ObjFile<ELFT> *File = Sec.getFile<ELFT>();
90
26
  uint32_t SymIndex = Rel.getSymbol(Config->IsMips64EL);
91
26
  const typename ELFT::Sym &Sym = File->getELFSyms()[SymIndex];
92
26
  uint32_t SecIndex = File->getSectionIndex(Sym);
93
26
  SymbolBody &B = File->getRelocTargetSym(Rel);
94
26
  auto &DR = cast<DefinedRegular>(B);
95
26
  uint64_t Val = DR.Value + getAddend<ELFT>(Rel);
96
26
97
26
  // FIXME: We should be consistent about always adding the file
98
26
  // offset or not.
99
26
  if (DR.Section->Flags & ELF::SHF_ALLOC)
100
24
    Val += cast<InputSection>(DR.Section)->getOffsetInFile();
101
45
102
45
  return RelocAddrEntry{SecIndex, Val};
103
45
}
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> >) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> >) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> >) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> >) const
llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> >) const
Line
Count
Source
81
39
                           ArrayRef<RelTy> Rels) const {
82
39
  auto It = std::lower_bound(
83
39
      Rels.begin(), Rels.end(), Pos,
84
39
      [](const RelTy &A, uint64_t B) { return A.r_offset < B; });
85
39
  if (
It == Rels.end() || 39
It->r_offset != Pos31
)
86
13
    return None;
87
26
  const RelTy &Rel = *It;
88
26
89
26
  const ObjFile<ELFT> *File = Sec.getFile<ELFT>();
90
26
  uint32_t SymIndex = Rel.getSymbol(Config->IsMips64EL);
91
26
  const typename ELFT::Sym &Sym = File->getELFSyms()[SymIndex];
92
26
  uint32_t SecIndex = File->getSectionIndex(Sym);
93
26
  SymbolBody &B = File->getRelocTargetSym(Rel);
94
26
  auto &DR = cast<DefinedRegular>(B);
95
26
  uint64_t Val = DR.Value + getAddend<ELFT>(Rel);
96
26
97
26
  // FIXME: We should be consistent about always adding the file
98
26
  // offset or not.
99
26
  if (DR.Section->Flags & ELF::SHF_ALLOC)
100
24
    Val += cast<InputSection>(DR.Section)->getOffsetInFile();
101
39
102
39
  return RelocAddrEntry{SecIndex, Val};
103
39
}
llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> >) const
Line
Count
Source
81
6
                           ArrayRef<RelTy> Rels) const {
82
6
  auto It = std::lower_bound(
83
6
      Rels.begin(), Rels.end(), Pos,
84
6
      [](const RelTy &A, uint64_t B) { return A.r_offset < B; });
85
6
  if (
It == Rels.end() || 6
It->r_offset != Pos0
)
86
6
    return None;
87
0
  const RelTy &Rel = *It;
88
0
89
0
  const ObjFile<ELFT> *File = Sec.getFile<ELFT>();
90
0
  uint32_t SymIndex = Rel.getSymbol(Config->IsMips64EL);
91
0
  const typename ELFT::Sym &Sym = File->getELFSyms()[SymIndex];
92
0
  uint32_t SecIndex = File->getSectionIndex(Sym);
93
0
  SymbolBody &B = File->getRelocTargetSym(Rel);
94
0
  auto &DR = cast<DefinedRegular>(B);
95
0
  uint64_t Val = DR.Value + getAddend<ELFT>(Rel);
96
0
97
0
  // FIXME: We should be consistent about always adding the file
98
0
  // offset or not.
99
0
  if (DR.Section->Flags & ELF::SHF_ALLOC)
100
0
    Val += cast<InputSection>(DR.Section)->getOffsetInFile();
101
6
102
6
  return RelocAddrEntry{SecIndex, Val};
103
6
}
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >) const
Unexecuted instantiation: llvm::Optional<llvm::RelocAddrEntry> lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::findAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >(lld::elf::InputSectionBase const&, unsigned long long, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >) const
104
105
template <class ELFT>
106
Optional<RelocAddrEntry> LLDDwarfObj<ELFT>::find(const llvm::DWARFSection &S,
107
45
                                                 uint64_t Pos) const {
108
45
  auto &Sec = static_cast<const LLDDWARFSection &>(S);
109
45
  if (Sec.Sec->AreRelocsRela)
110
40
    return findAux(*Sec.Sec, Pos, Sec.Sec->template relas<ELFT>());
111
5
  return findAux(*Sec.Sec, Pos, Sec.Sec->template rels<ELFT>());
112
5
}
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, false> >::find(llvm::DWARFSection const&, unsigned long long) const
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, false> >::find(llvm::DWARFSection const&, unsigned long long) const
lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)1, true> >::find(llvm::DWARFSection const&, unsigned long long) const
Line
Count
Source
107
45
                                                 uint64_t Pos) const {
108
45
  auto &Sec = static_cast<const LLDDWARFSection &>(S);
109
45
  if (Sec.Sec->AreRelocsRela)
110
40
    return findAux(*Sec.Sec, Pos, Sec.Sec->template relas<ELFT>());
111
5
  return findAux(*Sec.Sec, Pos, Sec.Sec->template rels<ELFT>());
112
5
}
Unexecuted instantiation: lld::elf::LLDDwarfObj<llvm::object::ELFType<(llvm::support::endianness)0, true> >::find(llvm::DWARFSection const&, unsigned long long) const
113
114
template class elf::LLDDwarfObj<ELF32LE>;
115
template class elf::LLDDwarfObj<ELF32BE>;
116
template class elf::LLDDwarfObj<ELF64LE>;
117
template class elf::LLDDwarfObj<ELF64BE>;