Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/Support/BuryPointer.h
Line
Count
Source
1
//===- llvm/Support/BuryPointer.h - Memory Manipulation/Leak ----*- 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
#ifndef LLVM_SUPPORT_BURYPOINTER_H
10
#define LLVM_SUPPORT_BURYPOINTER_H
11
12
#include <memory>
13
14
namespace llvm {
15
16
// In tools that will exit soon anyway, going through the process of explicitly
17
// deallocating resources can be unnecessary - better to leak the resources and
18
// let the OS clean them up when the process ends. Use this function to ensure
19
// the memory is not misdiagnosed as an unintentional leak by leak detection
20
// tools (this is achieved by preserving pointers to the object in a globally
21
// visible array).
22
void BuryPointer(const void *Ptr);
23
55.6k
template <typename T> void BuryPointer(std::unique_ptr<T> Ptr) {
24
55.6k
  BuryPointer(Ptr.release());
25
55.6k
}
void llvm::BuryPointer<clang::CompilerInstance>(std::__1::unique_ptr<clang::CompilerInstance, std::__1::default_delete<clang::CompilerInstance> >)
Line
Count
Source
23
14.4k
template <typename T> void BuryPointer(std::unique_ptr<T> Ptr) {
24
14.4k
  BuryPointer(Ptr.release());
25
14.4k
}
void llvm::BuryPointer<llvm::TargetMachine>(std::__1::unique_ptr<llvm::TargetMachine, std::__1::default_delete<llvm::TargetMachine> >)
Line
Count
Source
23
12.4k
template <typename T> void BuryPointer(std::unique_ptr<T> Ptr) {
24
12.4k
  BuryPointer(Ptr.release());
25
12.4k
}
void llvm::BuryPointer<clang::Sema>(std::__1::unique_ptr<clang::Sema, std::__1::default_delete<clang::Sema> >)
Line
Count
Source
23
14.3k
template <typename T> void BuryPointer(std::unique_ptr<T> Ptr) {
24
14.3k
  BuryPointer(Ptr.release());
25
14.3k
}
void llvm::BuryPointer<clang::ASTUnit>(std::__1::unique_ptr<clang::ASTUnit, std::__1::default_delete<clang::ASTUnit> >)
Line
Count
Source
23
7
template <typename T> void BuryPointer(std::unique_ptr<T> Ptr) {
24
7
  BuryPointer(Ptr.release());
25
7
}
void llvm::BuryPointer<clang::FrontendAction>(std::__1::unique_ptr<clang::FrontendAction, std::__1::default_delete<clang::FrontendAction> >)
Line
Count
Source
23
14.4k
template <typename T> void BuryPointer(std::unique_ptr<T> Ptr) {
24
14.4k
  BuryPointer(Ptr.release());
25
14.4k
}
26
27
} // namespace llvm
28
29
#endif