Coverage Report

Created: 2017-09-21 03:39

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/COFF/Memory.h
Line
Count
Source (jump to first uncovered line)
1
//===- Memory.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
// See ELF/Memory.h
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLD_COFF_MEMORY_H
15
#define LLD_COFF_MEMORY_H
16
17
#include "llvm/Support/Allocator.h"
18
#include "llvm/Support/StringSaver.h"
19
#include <vector>
20
21
namespace lld {
22
namespace coff {
23
24
extern llvm::BumpPtrAllocator BAlloc;
25
extern llvm::StringSaver Saver;
26
27
struct SpecificAllocBase {
28
4.15k
  SpecificAllocBase() { Instances.push_back(this); }
29
4.15k
  virtual ~SpecificAllocBase() = default;
30
  virtual void reset() = 0;
31
  static std::vector<SpecificAllocBase *> Instances;
32
};
33
34
template <class T> struct SpecificAlloc : public SpecificAllocBase {
35
0
  void reset() override { Alloc.DestroyAll(); }
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::LocalImportChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::OrdinalOnlyChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::HintNameChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::LookupChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::NullChunk>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::StringChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::ImportDirectoryChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::DelayDirectoryChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::DelayAddressChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::ThunkChunkX64>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::ThunkChunkX86>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::ThunkChunkARM>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::AddressTableChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::NamePointersChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::ExportOrdinalChunk>::reset()
Unexecuted instantiation: DLL.cpp:lld::coff::SpecificAlloc<lld::coff::(anonymous namespace)::ExportDirectoryChunk>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::Configuration>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::SymbolTable>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::LinkerDriver>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> > >::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ArchiveFile>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::BitcodeFile>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ObjFile>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ImportFile>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::SectionChunk>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::CommonChunk>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::DefinedAbsolute>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::DefinedRegular>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::Symbol>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ImportThunkChunkX64>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ImportThunkChunkX86>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ImportThunkChunkARM64>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::ImportThunkChunkARM>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::OutputSection>::reset()
Unexecuted instantiation: Writer.cpp:lld::coff::SpecificAlloc<(anonymous namespace)::DebugDirectoryChunk>::reset()
Unexecuted instantiation: Writer.cpp:lld::coff::SpecificAlloc<(anonymous namespace)::CVDebugRecordChunk>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::SEHTableChunk>::reset()
Unexecuted instantiation: lld::coff::SpecificAlloc<lld::coff::BaserelChunk>::reset()
36
  llvm::SpecificBumpPtrAllocator<T> Alloc;
37
};
38
39
9.47k
template <typename T, typename... U> T *make(U &&... Args) {
40
9.47k
  static SpecificAlloc<T> Alloc;
41
9.47k
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
9.47k
}
lld::coff::LocalImportChunk* lld::coff::make<lld::coff::LocalImportChunk, lld::coff::Defined*&>(lld::coff::Defined*&&&)
Line
Count
Source
39
2
template <typename T, typename... U> T *make(U &&... Args) {
40
2
  static SpecificAlloc<T> Alloc;
41
2
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
2
}
DLL.cpp:lld::coff::(anonymous namespace)::OrdinalOnlyChunk* lld::coff::make<lld::coff::(anonymous namespace)::OrdinalOnlyChunk, unsigned short&>(unsigned short&&&)
Line
Count
Source
39
14
template <typename T, typename... U> T *make(U &&... Args) {
40
14
  static SpecificAlloc<T> Alloc;
41
14
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
14
}
DLL.cpp:lld::coff::(anonymous namespace)::HintNameChunk* lld::coff::make<lld::coff::(anonymous namespace)::HintNameChunk, llvm::StringRef, unsigned short&>(llvm::StringRef&&, unsigned short&&&)
Line
Count
Source
39
49
template <typename T, typename... U> T *make(U &&... Args) {
40
49
  static SpecificAlloc<T> Alloc;
41
49
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
49
}
DLL.cpp:lld::coff::(anonymous namespace)::LookupChunk* lld::coff::make<lld::coff::(anonymous namespace)::LookupChunk, lld::coff::(anonymous namespace)::HintNameChunk*&>(lld::coff::(anonymous namespace)::HintNameChunk*&&&)
Line
Count
Source
39
103
template <typename T, typename... U> T *make(U &&... Args) {
40
103
  static SpecificAlloc<T> Alloc;
41
103
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
103
}
DLL.cpp:lld::coff::(anonymous namespace)::NullChunk* lld::coff::make<lld::coff::(anonymous namespace)::NullChunk, int>(int&&)
Line
Count
Source
39
63
template <typename T, typename... U> T *make(U &&... Args) {
40
63
  static SpecificAlloc<T> Alloc;
41
63
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
63
}
lld::coff::StringChunk* lld::coff::make<lld::coff::StringChunk, llvm::StringRef>(llvm::StringRef&&)
Line
Count
Source
39
287
template <typename T, typename... U> T *make(U &&... Args) {
40
287
  static SpecificAlloc<T> Alloc;
41
287
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
287
}
DLL.cpp:lld::coff::(anonymous namespace)::ImportDirectoryChunk* lld::coff::make<lld::coff::(anonymous namespace)::ImportDirectoryChunk, lld::coff::Chunk*&>(lld::coff::Chunk*&&&)
Line
Count
Source
39
27
template <typename T, typename... U> T *make(U &&... Args) {
40
27
  static SpecificAlloc<T> Alloc;
41
27
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
27
}
DLL.cpp:lld::coff::(anonymous namespace)::NullChunk* lld::coff::make<lld::coff::(anonymous namespace)::NullChunk, unsigned long>(unsigned long&&)
Line
Count
Source
39
29
template <typename T, typename... U> T *make(U &&... Args) {
40
29
  static SpecificAlloc<T> Alloc;
41
29
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
29
}
DLL.cpp:lld::coff::(anonymous namespace)::DelayDirectoryChunk* lld::coff::make<lld::coff::(anonymous namespace)::DelayDirectoryChunk, lld::coff::Chunk*&>(lld::coff::Chunk*&&&)
Line
Count
Source
39
3
template <typename T, typename... U> T *make(U &&... Args) {
40
3
  static SpecificAlloc<T> Alloc;
41
3
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
3
}
DLL.cpp:lld::coff::(anonymous namespace)::DelayAddressChunk* lld::coff::make<lld::coff::(anonymous namespace)::DelayAddressChunk, lld::coff::Chunk*&>(lld::coff::Chunk*&&&)
Line
Count
Source
39
6
template <typename T, typename... U> T *make(U &&... Args) {
40
6
  static SpecificAlloc<T> Alloc;
41
6
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
6
}
DLL.cpp:lld::coff::(anonymous namespace)::OrdinalOnlyChunk* lld::coff::make<lld::coff::(anonymous namespace)::OrdinalOnlyChunk, unsigned short>(unsigned short&&)
Line
Count
Source
39
1
template <typename T, typename... U> T *make(U &&... Args) {
40
1
  static SpecificAlloc<T> Alloc;
41
1
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
1
}
DLL.cpp:lld::coff::(anonymous namespace)::HintNameChunk* lld::coff::make<lld::coff::(anonymous namespace)::HintNameChunk, llvm::StringRef&, int>(llvm::StringRef&&&, int&&)
Line
Count
Source
39
5
template <typename T, typename... U> T *make(U &&... Args) {
40
5
  static SpecificAlloc<T> Alloc;
41
5
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
5
}
DLL.cpp:lld::coff::(anonymous namespace)::ThunkChunkX64* lld::coff::make<lld::coff::(anonymous namespace)::ThunkChunkX64, lld::coff::DefinedImportData*&, lld::coff::Chunk*&, lld::coff::Defined*&>(lld::coff::DefinedImportData*&&&, lld::coff::Chunk*&&&, lld::coff::Defined*&&&)
Line
Count
Source
39
3
template <typename T, typename... U> T *make(U &&... Args) {
40
3
  static SpecificAlloc<T> Alloc;
41
3
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
3
}
DLL.cpp:lld::coff::(anonymous namespace)::ThunkChunkX86* lld::coff::make<lld::coff::(anonymous namespace)::ThunkChunkX86, lld::coff::DefinedImportData*&, lld::coff::Chunk*&, lld::coff::Defined*&>(lld::coff::DefinedImportData*&&&, lld::coff::Chunk*&&&, lld::coff::Defined*&&&)
Line
Count
Source
39
2
template <typename T, typename... U> T *make(U &&... Args) {
40
2
  static SpecificAlloc<T> Alloc;
41
2
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
2
}
DLL.cpp:lld::coff::(anonymous namespace)::ThunkChunkARM* lld::coff::make<lld::coff::(anonymous namespace)::ThunkChunkARM, lld::coff::DefinedImportData*&, lld::coff::Chunk*&, lld::coff::Defined*&>(lld::coff::DefinedImportData*&&&, lld::coff::Chunk*&&&, lld::coff::Defined*&&&)
Line
Count
Source
39
1
template <typename T, typename... U> T *make(U &&... Args) {
40
1
  static SpecificAlloc<T> Alloc;
41
1
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
1
}
DLL.cpp:lld::coff::(anonymous namespace)::AddressTableChunk* lld::coff::make<lld::coff::(anonymous namespace)::AddressTableChunk, unsigned short&>(unsigned short&&&)
Line
Count
Source
39
257
template <typename T, typename... U> T *make(U &&... Args) {
40
257
  static SpecificAlloc<T> Alloc;
41
257
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
257
}
lld::coff::StringChunk* lld::coff::make<lld::coff::StringChunk, llvm::StringRef&>(llvm::StringRef&&&)
Line
Count
Source
39
80
template <typename T, typename... U> T *make(U &&... Args) {
40
80
  static SpecificAlloc<T> Alloc;
41
80
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
80
}
DLL.cpp:lld::coff::(anonymous namespace)::NamePointersChunk* lld::coff::make<lld::coff::(anonymous namespace)::NamePointersChunk, std::__1::vector<lld::coff::Chunk*, std::__1::allocator<lld::coff::Chunk*> >&>(std::__1::vector<lld::coff::Chunk*, std::__1::allocator<lld::coff::Chunk*> >&&&)
Line
Count
Source
39
257
template <typename T, typename... U> T *make(U &&... Args) {
40
257
  static SpecificAlloc<T> Alloc;
41
257
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
257
}
DLL.cpp:lld::coff::(anonymous namespace)::ExportOrdinalChunk* lld::coff::make<lld::coff::(anonymous namespace)::ExportOrdinalChunk, unsigned long>(unsigned long&&)
Line
Count
Source
39
257
template <typename T, typename... U> T *make(U &&... Args) {
40
257
  static SpecificAlloc<T> Alloc;
41
257
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
257
}
DLL.cpp:lld::coff::(anonymous namespace)::ExportDirectoryChunk* lld::coff::make<lld::coff::(anonymous namespace)::ExportDirectoryChunk, unsigned short&, unsigned long, lld::coff::StringChunk*&, lld::coff::(anonymous namespace)::AddressTableChunk*&, lld::coff::(anonymous namespace)::NamePointersChunk*&, lld::coff::(anonymous namespace)::ExportOrdinalChunk*&>(unsigned short&&&, unsigned long&&, lld::coff::StringChunk*&&&, lld::coff::(anonymous namespace)::AddressTableChunk*&&&, lld::coff::(anonymous namespace)::NamePointersChunk*&&&, lld::coff::(anonymous namespace)::ExportOrdinalChunk*&&&)
Line
Count
Source
39
257
template <typename T, typename... U> T *make(U &&... Args) {
40
257
  static SpecificAlloc<T> Alloc;
41
257
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
257
}
lld::coff::Configuration* lld::coff::make<lld::coff::Configuration>()
Line
Count
Source
39
275
template <typename T, typename... U> T *make(U &&... Args) {
40
275
  static SpecificAlloc<T> Alloc;
41
275
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
275
}
lld::coff::SymbolTable* lld::coff::make<lld::coff::SymbolTable>()
Line
Count
Source
39
275
template <typename T, typename... U> T *make(U &&... Args) {
40
275
  static SpecificAlloc<T> Alloc;
41
275
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
275
}
lld::coff::LinkerDriver* lld::coff::make<lld::coff::LinkerDriver>()
Line
Count
Source
39
275
template <typename T, typename... U> T *make(U &&... Args) {
40
275
  static SpecificAlloc<T> Alloc;
41
275
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
275
}
std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >* lld::coff::make<std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> > >(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >&&)
Line
Count
Source
39
363
template <typename T, typename... U> T *make(U &&... Args) {
40
363
  static SpecificAlloc<T> Alloc;
41
363
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
363
}
lld::coff::ArchiveFile* lld::coff::make<lld::coff::ArchiveFile, llvm::MemoryBufferRef&>(llvm::MemoryBufferRef&&&)
Line
Count
Source
39
55
template <typename T, typename... U> T *make(U &&... Args) {
40
55
  static SpecificAlloc<T> Alloc;
41
55
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
55
}
lld::coff::BitcodeFile* lld::coff::make<lld::coff::BitcodeFile, llvm::MemoryBufferRef&>(llvm::MemoryBufferRef&&&)
Line
Count
Source
39
49
template <typename T, typename... U> T *make(U &&... Args) {
40
49
  static SpecificAlloc<T> Alloc;
41
49
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
49
}
lld::coff::ObjFile* lld::coff::make<lld::coff::ObjFile, llvm::MemoryBufferRef&>(llvm::MemoryBufferRef&&&)
Line
Count
Source
39
275
template <typename T, typename... U> T *make(U &&... Args) {
40
275
  static SpecificAlloc<T> Alloc;
41
275
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
275
}
lld::coff::ImportFile* lld::coff::make<lld::coff::ImportFile, llvm::MemoryBufferRef&>(llvm::MemoryBufferRef&&&)
Line
Count
Source
39
66
template <typename T, typename... U> T *make(U &&... Args) {
40
66
  static SpecificAlloc<T> Alloc;
41
66
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
66
}
lld::coff::SectionChunk* lld::coff::make<lld::coff::SectionChunk, lld::coff::ObjFile*, llvm::object::coff_section const*&>(lld::coff::ObjFile*&&, llvm::object::coff_section const*&&&)
Line
Count
Source
39
821
template <typename T, typename... U> T *make(U &&... Args) {
40
821
  static SpecificAlloc<T> Alloc;
41
821
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
821
}
lld::coff::CommonChunk* lld::coff::make<lld::coff::CommonChunk, llvm::object::COFFSymbolRef&>(llvm::object::COFFSymbolRef&&&)
Line
Count
Source
39
10
template <typename T, typename... U> T *make(U &&... Args) {
40
10
  static SpecificAlloc<T> Alloc;
41
10
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
10
}
lld::coff::DefinedAbsolute* lld::coff::make<lld::coff::DefinedAbsolute, llvm::StringRef&, llvm::object::COFFSymbolRef&>(llvm::StringRef&&&, llvm::object::COFFSymbolRef&&&)
Line
Count
Source
39
2
template <typename T, typename... U> T *make(U &&... Args) {
40
2
  static SpecificAlloc<T> Alloc;
41
2
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
2
}
lld::coff::DefinedRegular* lld::coff::make<lld::coff::DefinedRegular, lld::coff::ObjFile*, char const (&) [1], bool, bool, llvm::object::coff_symbol_generic const*, lld::coff::SectionChunk*&>(lld::coff::ObjFile*&&, char const (&&&) [1], bool&&, bool&&, llvm::object::coff_symbol_generic const*&&, lld::coff::SectionChunk*&&&)
Line
Count
Source
39
938
template <typename T, typename... U> T *make(U &&... Args) {
40
938
  static SpecificAlloc<T> Alloc;
41
938
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
938
}
lld::coff::Symbol* lld::coff::make<lld::coff::Symbol>()
Line
Count
Source
39
3.00k
template <typename T, typename... U> T *make(U &&... Args) {
40
3.00k
  static SpecificAlloc<T> Alloc;
41
3.00k
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
3.00k
}
lld::coff::ObjFile* lld::coff::make<lld::coff::ObjFile, llvm::MemoryBufferRef>(llvm::MemoryBufferRef&&)
Line
Count
Source
39
43
template <typename T, typename... U> T *make(U &&... Args) {
40
43
  static SpecificAlloc<T> Alloc;
41
43
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
43
}
lld::coff::ImportThunkChunkX64* lld::coff::make<lld::coff::ImportThunkChunkX64, lld::coff::DefinedImportData*&>(lld::coff::DefinedImportData*&&&)
Line
Count
Source
39
46
template <typename T, typename... U> T *make(U &&... Args) {
40
46
  static SpecificAlloc<T> Alloc;
41
46
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
46
}
lld::coff::ImportThunkChunkX86* lld::coff::make<lld::coff::ImportThunkChunkX86, lld::coff::DefinedImportData*&>(lld::coff::DefinedImportData*&&&)
Line
Count
Source
39
12
template <typename T, typename... U> T *make(U &&... Args) {
40
12
  static SpecificAlloc<T> Alloc;
41
12
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
12
}
lld::coff::ImportThunkChunkARM64* lld::coff::make<lld::coff::ImportThunkChunkARM64, lld::coff::DefinedImportData*&>(lld::coff::DefinedImportData*&&&)
Line
Count
Source
39
3
template <typename T, typename... U> T *make(U &&... Args) {
40
3
  static SpecificAlloc<T> Alloc;
41
3
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
3
}
lld::coff::ImportThunkChunkARM* lld::coff::make<lld::coff::ImportThunkChunkARM, lld::coff::DefinedImportData*&>(lld::coff::DefinedImportData*&&&)
Line
Count
Source
39
2
template <typename T, typename... U> T *make(U &&... Args) {
40
2
  static SpecificAlloc<T> Alloc;
41
2
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
2
}
lld::coff::OutputSection* lld::coff::make<lld::coff::OutputSection, llvm::StringRef&>(llvm::StringRef&&&)
Line
Count
Source
39
1.13k
template <typename T, typename... U> T *make(U &&... Args) {
40
1.13k
  static SpecificAlloc<T> Alloc;
41
1.13k
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
1.13k
}
Writer.cpp:(anonymous namespace)::DebugDirectoryChunk* lld::coff::make<(anonymous namespace)::DebugDirectoryChunk, std::__1::vector<lld::coff::Chunk*, std::__1::allocator<lld::coff::Chunk*> >&>(std::__1::vector<lld::coff::Chunk*, std::__1::allocator<lld::coff::Chunk*> >&&&)
Line
Count
Source
39
42
template <typename T, typename... U> T *make(U &&... Args) {
40
42
  static SpecificAlloc<T> Alloc;
41
42
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
42
}
Writer.cpp:(anonymous namespace)::CVDebugRecordChunk* lld::coff::make<(anonymous namespace)::CVDebugRecordChunk>()
Line
Count
Source
39
42
template <typename T, typename... U> T *make(U &&... Args) {
40
42
  static SpecificAlloc<T> Alloc;
41
42
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
42
}
lld::coff::SEHTableChunk* lld::coff::make<lld::coff::SEHTableChunk, std::__1::set<lld::coff::Defined*, std::__1::less<lld::coff::Defined*>, std::__1::allocator<lld::coff::Defined*> >&>(std::__1::set<lld::coff::Defined*, std::__1::less<lld::coff::Defined*>, std::__1::allocator<lld::coff::Defined*> >&&&)
Line
Count
Source
39
2
template <typename T, typename... U> T *make(U &&... Args) {
40
2
  static SpecificAlloc<T> Alloc;
41
2
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
2
}
lld::coff::BaserelChunk* lld::coff::make<lld::coff::BaserelChunk, unsigned int&, lld::coff::Baserel*, lld::coff::Baserel*>(unsigned int&&&, lld::coff::Baserel*&&, lld::coff::Baserel*&&)
Line
Count
Source
39
41
template <typename T, typename... U> T *make(U &&... Args) {
40
41
  static SpecificAlloc<T> Alloc;
41
41
  return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
42
41
}
43
44
0
inline void freeArena() {
45
0
  for (SpecificAllocBase *Alloc : SpecificAllocBase::Instances)
46
0
    Alloc->reset();
47
0
  BAlloc.Reset();
48
0
}
49
}
50
}
51
52
#endif