LLVM
22.0.0git
include
llvm
Support
Valgrind.h
Go to the documentation of this file.
1
//===- llvm/Support/Valgrind.h - Communication with Valgrind ----*- 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
// Methods for communicating with a valgrind instance this program is running
10
// under. These are all no-ops unless LLVM was configured on a system with the
11
// valgrind headers installed and valgrind is controlling this process.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_SUPPORT_VALGRIND_H
16
#define LLVM_SUPPORT_VALGRIND_H
17
18
#include "
llvm/Support/Compiler.h
"
19
#include <cstddef>
20
21
namespace
llvm
{
22
namespace
sys
{
23
// True if Valgrind is controlling this process.
24
LLVM_ABI
bool
RunningOnValgrind
();
25
26
// Discard valgrind's translation of code in the range [Addr .. Addr + Len).
27
// Otherwise valgrind may continue to execute the old version of the code.
28
LLVM_ABI
void
ValgrindDiscardTranslations
(
const
void
*Addr,
size_t
Len);
29
}
// namespace sys
30
}
// end namespace llvm
31
32
#endif
// LLVM_SUPPORT_VALGRIND_H
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
llvm::sys
Definition
Atomic.h:29
llvm::sys::RunningOnValgrind
LLVM_ABI bool RunningOnValgrind()
Definition
Valgrind.cpp:32
llvm::sys::ValgrindDiscardTranslations
LLVM_ABI void ValgrindDiscardTranslations(const void *Addr, size_t Len)
Definition
Valgrind.cpp:36
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0