Coverage Report

Created: 2017-09-19 22:28

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/ELF/Error.h
Line
Count
Source (jump to first uncovered line)
1
//===- Error.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
// In LLD, we have three levels of errors: fatal, error or warn.
11
//
12
// Fatal makes the program exit immediately with an error message.
13
// You shouldn't use it except for reporting a corrupted input file.
14
//
15
// Error prints out an error message and increment a global variable
16
// ErrorCount to record the fact that we met an error condition. It does
17
// not exit, so it is safe for a lld-as-a-library use case. It is generally
18
// useful because it can report more than one error in a single run.
19
//
20
// Warn doesn't do anything but printing out a given message.
21
//
22
// It is not recommended to use llvm::outs() or llvm::errs() directly
23
// in LLD because they are not thread-safe. The functions declared in
24
// this file are mutually excluded, so you want to use them instead.
25
//
26
//===----------------------------------------------------------------------===//
27
28
#ifndef LLD_ELF_ERROR_H
29
#define LLD_ELF_ERROR_H
30
31
#include "lld/Core/LLVM.h"
32
33
#include "llvm/Support/Error.h"
34
35
namespace lld {
36
namespace elf {
37
38
extern uint64_t ErrorCount;
39
extern llvm::raw_ostream *ErrorOS;
40
41
void log(const Twine &Msg);
42
void message(const Twine &Msg);
43
void warn(const Twine &Msg);
44
void error(const Twine &Msg);
45
LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg);
46
47
LLVM_ATTRIBUTE_NORETURN void exitLld(int Val);
48
49
// check() functions are convenient functions to strip errors
50
// from error-or-value objects.
51
template <class T> T check(ErrorOr<T> E) {
52
  if (auto EC = E.getError())
53
    fatal(EC.message());
54
  return std::move(*E);
55
}
56
57
200k
template <class T> T check(Expected<T> E) {
58
200k
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
200k
  return std::move(*E);
61
200k
}
Unexecuted instantiation: llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >)
llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >)
Line
Count
Source
57
18
template <class T> T check(Expected<T> E) {
58
18
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
18
  return std::move(*E);
61
18
}
llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >)
Line
Count
Source
57
5
template <class T> T check(Expected<T> E) {
58
5
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
5
  return std::move(*E);
61
5
}
llvm::StringRef lld::elf::check<llvm::StringRef>(llvm::Expected<llvm::StringRef>)
Line
Count
Source
57
32
template <class T> T check(Expected<T> E) {
58
32
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
32
  return std::move(*E);
61
32
}
llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Phdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >)
Line
Count
Source
57
6
template <class T> T check(Expected<T> E) {
58
6
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
6
  return std::move(*E);
61
6
}
std::__1::function<std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)> lld::elf::check<std::__1::function<std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)> >(llvm::Expected<std::__1::function<std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)> >)
Line
Count
Source
57
3
template <class T> T check(Expected<T> E) {
58
3
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
3
  return std::move(*E);
61
3
}
llvm::ArrayRef<unsigned char> lld::elf::check<llvm::ArrayRef<unsigned char> >(llvm::Expected<llvm::ArrayRef<unsigned char> >)
Line
Count
Source
57
200k
template <class T> T check(Expected<T> E) {
58
200k
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
200k
  return std::move(*E);
61
200k
}
llvm::object::Decompressor lld::elf::check<llvm::object::Decompressor>(llvm::Expected<llvm::object::Decompressor>)
Line
Count
Source
57
3
template <class T> T check(Expected<T> E) {
58
3
  if (!E)
59
0
    fatal(llvm::toString(E.takeError()));
60
3
  return std::move(*E);
61
3
}
62
63
20
template <class T> T check(ErrorOr<T> E, const Twine &Prefix) {
64
20
  if (auto EC = E.getError())
65
0
    fatal(Prefix + ": " + EC.message());
66
20
  return std::move(*E);
67
20
}
68
69
224k
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
224k
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
224k
  return std::move(*E);
73
224k
}
llvm::StringRef lld::elf::check<llvm::StringRef>(llvm::Expected<llvm::StringRef>, llvm::Twine const&)
Line
Count
Source
69
210k
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
210k
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
210k
  return std::move(*E);
73
210k
}
llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >, llvm::Twine const&)
Line
Count
Source
69
142
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
142
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
142
  return std::move(*E);
73
142
}
llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >, llvm::Twine const&)
Line
Count
Source
69
1.73k
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
1.73k
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
1.73k
  return std::move(*E);
73
1.73k
}
llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >, llvm::Twine const&)
Line
Count
Source
69
58
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
58
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
58
  return std::move(*E);
73
58
}
llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > const* lld::elf::check<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > const*>(llvm::Expected<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > const*>, llvm::Twine const&)
Line
Count
Source
69
7
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
7
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
7
  return std::move(*E);
73
7
}
llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > const* lld::elf::check<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > const*>(llvm::Expected<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > const*>, llvm::Twine const&)
Line
Count
Source
69
2
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
2
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
2
  return std::move(*E);
73
2
}
llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)1, 2ul> > lld::elf::check<llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)1, 2ul> > >(llvm::Expected<llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)1, 2ul> > >, llvm::Twine const&)
Line
Count
Source
69
20
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
20
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
20
  return std::move(*E);
73
20
}
llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >, llvm::Twine const&)
Line
Count
Source
69
265
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
265
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
265
  return std::move(*E);
73
265
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, true> > >, llvm::Twine const&)
Line
Count
Source
69
2
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
2
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
2
  return std::move(*E);
73
2
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false>, false> > >, llvm::Twine const&)
Line
Count
Source
69
194
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
194
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
194
  return std::move(*E);
73
194
}
llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > const* lld::elf::check<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > const*>(llvm::Expected<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > const*>, llvm::Twine const&)
Line
Count
Source
69
5
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
5
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
5
  return std::move(*E);
73
5
}
Unexecuted instantiation: llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > const* lld::elf::check<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > const*>(llvm::Expected<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > const*>, llvm::Twine const&)
Unexecuted instantiation: llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)0, 2ul> > lld::elf::check<llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)0, 2ul> > >(llvm::Expected<llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)0, 2ul> > >, llvm::Twine const&)
llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >, llvm::Twine const&)
Line
Count
Source
69
142
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
142
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
142
  return std::move(*E);
73
142
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, true> > >, llvm::Twine const&)
Line
Count
Source
69
7
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
7
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
7
  return std::move(*E);
73
7
}
llvm::MemoryBufferRef lld::elf::check<llvm::MemoryBufferRef>(llvm::Expected<llvm::MemoryBufferRef>, llvm::Twine const&)
Line
Count
Source
69
71
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
71
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
71
  return std::move(*E);
73
71
}
llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > const* lld::elf::check<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > const*>(llvm::Expected<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > const*>, llvm::Twine const&)
Line
Count
Source
69
58
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
58
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
58
  return std::move(*E);
73
58
}
llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > const* lld::elf::check<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > const*>(llvm::Expected<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > const*>, llvm::Twine const&)
Line
Count
Source
69
46
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
46
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
46
  return std::move(*E);
73
46
}
llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >, llvm::Twine const&)
Line
Count
Source
69
1.69k
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
1.69k
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
1.69k
  return std::move(*E);
73
1.69k
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, true> > >, llvm::Twine const&)
Line
Count
Source
69
660
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
660
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
660
  return std::move(*E);
73
660
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true>, false> > >, llvm::Twine const&)
Line
Count
Source
69
1
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
1
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
1
  return std::move(*E);
73
1
}
Unexecuted instantiation: llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > const* lld::elf::check<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > const*>(llvm::Expected<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > const*>, llvm::Twine const&)
Unexecuted instantiation: llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > const* lld::elf::check<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > const*>(llvm::Expected<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > const*>, llvm::Twine const&)
llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >, llvm::Twine const&)
Line
Count
Source
69
58
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
58
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
58
  return std::move(*E);
73
58
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> > >, llvm::Twine const&)
Line
Count
Source
69
46
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
46
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
46
  return std::move(*E);
73
46
}
Unexecuted instantiation: llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> > >, llvm::Twine const&)
llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >, llvm::Twine const&)
Line
Count
Source
69
43
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
43
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
43
  return std::move(*E);
73
43
}
llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false> > > >, llvm::Twine const&)
Line
Count
Source
69
17
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
17
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
17
  return std::move(*E);
73
17
}
llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)1, true> > > >, llvm::Twine const&)
Line
Count
Source
69
151
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
151
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
151
  return std::move(*E);
73
151
}
llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Dyn_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true> > > >, llvm::Twine const&)
Line
Count
Source
69
7
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
7
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
7
  return std::move(*E);
73
7
}
llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Sym_Impl<llvm::object::ELFType<(llvm::support::endianness)1, false> > > >, llvm::Twine const&)
Line
Count
Source
69
266
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
266
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
266
  return std::move(*E);
73
266
}
unsigned int lld::elf::check<unsigned int>(llvm::Expected<unsigned int>, llvm::Twine const&)
Line
Count
Source
69
6.82k
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
6.82k
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
6.82k
  return std::move(*E);
73
6.82k
}
std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile> > lld::elf::check<std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile> > >(llvm::Expected<std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile> > >, llvm::Twine const&)
Line
Count
Source
69
170
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
170
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
170
  return std::move(*E);
73
170
}
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > lld::elf::check<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::Expected<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, llvm::Twine const&)
Line
Count
Source
69
1
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
1
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
1
  return std::move(*E);
73
1
}
llvm::object::Archive::Child lld::elf::check<llvm::object::Archive::Child>(llvm::Expected<llvm::object::Archive::Child>, llvm::Twine const&)
Line
Count
Source
69
51
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
51
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
51
  return std::move(*E);
73
51
}
llvm::CachePruningPolicy lld::elf::check<llvm::CachePruningPolicy>(llvm::Expected<llvm::CachePruningPolicy>, llvm::Twine const&)
Line
Count
Source
69
1.75k
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
1.75k
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
1.75k
  return std::move(*E);
73
1.75k
}
std::__1::unique_ptr<llvm::object::Archive, std::__1::default_delete<llvm::object::Archive> > lld::elf::check<std::__1::unique_ptr<llvm::object::Archive, std::__1::default_delete<llvm::object::Archive> > >(llvm::Expected<std::__1::unique_ptr<llvm::object::Archive, std::__1::default_delete<llvm::object::Archive> > >, llvm::Twine const&)
Line
Count
Source
69
93
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
93
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
93
  return std::move(*E);
73
93
}
llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> > lld::elf::check<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> > >(llvm::Expected<llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, false>, false> > >, llvm::Twine const&)
Line
Count
Source
69
63
template <class T> T check(Expected<T> E, const Twine &Prefix) {
70
63
  if (!E)
71
0
    fatal(Prefix + ": " + toString(E.takeError()));
72
63
  return std::move(*E);
73
63
}
74
75
} // namespace elf
76
} // namespace lld
77
78
#endif