Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/Support/Capacity.h
Line
Count
Source
1
//===--- Capacity.h - Generic computation of ADT memory use -----*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file defines the capacity function that computes the amount of
10
// memory used by an ADT.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_SUPPORT_CAPACITY_H
15
#define LLVM_SUPPORT_CAPACITY_H
16
17
#include <cstddef>
18
19
namespace llvm {
20
21
template <typename T>
22
14
static inline size_t capacity_in_bytes(const T &x) {
23
14
  // This default definition of capacity should work for things like std::vector
24
14
  // and friends.  More specialized versions will work for others.
25
14
  return x.capacity() * sizeof(typename T::value_type);
26
14
}
SourceManager.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::SrcMgr::ContentCache*, std::__1::allocator<clang::SrcMgr::ContentCache*> > >(std::__1::vector<clang::SrcMgr::ContentCache*, std::__1::allocator<clang::SrcMgr::ContentCache*> > const&)
Line
Count
Source
22
1
static inline size_t capacity_in_bytes(const T &x) {
23
1
  // This default definition of capacity should work for things like std::vector
24
1
  // and friends.  More specialized versions will work for others.
25
1
  return x.capacity() * sizeof(typename T::value_type);
26
1
}
ASTContext.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::VariableArrayType*, std::__1::allocator<clang::VariableArrayType*> > >(std::__1::vector<clang::VariableArrayType*, std::__1::allocator<clang::VariableArrayType*> > const&)
Line
Count
Source
22
1
static inline size_t capacity_in_bytes(const T &x) {
23
1
  // This default definition of capacity should work for things like std::vector
24
1
  // and friends.  More specialized versions will work for others.
25
1
  return x.capacity() * sizeof(typename T::value_type);
26
1
}
HeaderSearch.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::HeaderFileInfo, std::__1::allocator<clang::HeaderFileInfo> > >(std::__1::vector<clang::HeaderFileInfo, std::__1::allocator<clang::HeaderFileInfo> > const&)
Line
Count
Source
22
1
static inline size_t capacity_in_bytes(const T &x) {
23
1
  // This default definition of capacity should work for things like std::vector
24
1
  // and friends.  More specialized versions will work for others.
25
1
  return x.capacity() * sizeof(typename T::value_type);
26
1
}
HeaderSearch.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<std::__1::pair<clang::FileEntry const*, std::__1::unique_ptr<clang::HeaderMap, std::__1::default_delete<clang::HeaderMap> > >, std::__1::allocator<std::__1::pair<clang::FileEntry const*, std::__1::unique_ptr<clang::HeaderMap, std::__1::default_delete<clang::HeaderMap> > > > > >(std::__1::vector<std::__1::pair<clang::FileEntry const*, std::__1::unique_ptr<clang::HeaderMap, std::__1::default_delete<clang::HeaderMap> > >, std::__1::allocator<std::__1::pair<clang::FileEntry const*, std::__1::unique_ptr<clang::HeaderMap, std::__1::default_delete<clang::HeaderMap> > > > > const&)
Line
Count
Source
22
1
static inline size_t capacity_in_bytes(const T &x) {
23
1
  // This default definition of capacity should work for things like std::vector
24
1
  // and friends.  More specialized versions will work for others.
25
1
  return x.capacity() * sizeof(typename T::value_type);
26
1
}
Unexecuted instantiation: PPConditionalDirectiveRecord.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::PPConditionalDirectiveRecord::CondDirectiveLoc, std::__1::allocator<clang::PPConditionalDirectiveRecord::CondDirectiveLoc> > >(std::__1::vector<clang::PPConditionalDirectiveRecord::CondDirectiveLoc, std::__1::allocator<clang::PPConditionalDirectiveRecord::CondDirectiveLoc> > const&)
PreprocessingRecord.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::PreprocessedEntity*, std::__1::allocator<clang::PreprocessedEntity*> > >(std::__1::vector<clang::PreprocessedEntity*, std::__1::allocator<clang::PreprocessedEntity*> > const&)
Line
Count
Source
22
2
static inline size_t capacity_in_bytes(const T &x) {
23
2
  // This default definition of capacity should work for things like std::vector
24
2
  // and friends.  More specialized versions will work for others.
25
2
  return x.capacity() * sizeof(typename T::value_type);
26
2
}
PreprocessingRecord.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::SourceRange, std::__1::allocator<clang::SourceRange> > >(std::__1::vector<clang::SourceRange, std::__1::allocator<clang::SourceRange> > const&)
Line
Count
Source
22
1
static inline size_t capacity_in_bytes(const T &x) {
23
1
  // This default definition of capacity should work for things like std::vector
24
1
  // and friends.  More specialized versions will work for others.
25
1
  return x.capacity() * sizeof(typename T::value_type);
26
1
}
Preprocessor.cpp:unsigned long llvm::capacity_in_bytes<std::__1::vector<clang::CommentHandler*, std::__1::allocator<clang::CommentHandler*> > >(std::__1::vector<clang::CommentHandler*, std::__1::allocator<clang::CommentHandler*> > const&)
Line
Count
Source
22
7
static inline size_t capacity_in_bytes(const T &x) {
23
7
  // This default definition of capacity should work for things like std::vector
24
7
  // and friends.  More specialized versions will work for others.
25
7
  return x.capacity() * sizeof(typename T::value_type);
26
7
}
27
28
} // end namespace llvm
29
30
#endif
31