LLVM
20.0.0git
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
o
p
q
r
s
t
u
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
lib
Support
Valgrind.cpp
Go to the documentation of this file.
1
//===-- Valgrind.cpp - Implement Valgrind communication ---------*- 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
// Defines Valgrind communication methods, if HAVE_VALGRIND_VALGRIND_H is
10
// defined. If we have valgrind.h but valgrind isn't running, its macros are
11
// no-ops.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#include <stddef.h>
16
#include "
llvm/Support/Valgrind.h
"
17
#include "llvm/Config/config.h"
18
19
#if HAVE_VALGRIND_VALGRIND_H
20
#include <valgrind/valgrind.h>
21
22
bool
llvm::sys::RunningOnValgrind
() {
23
return
RUNNING_ON_VALGRIND;
24
}
25
26
void
llvm::sys::ValgrindDiscardTranslations
(
const
void
*
Addr
,
size_t
Len) {
27
VALGRIND_DISCARD_TRANSLATIONS(
Addr
, Len);
28
}
29
30
#else
// !HAVE_VALGRIND_VALGRIND_H
31
32
bool
llvm::sys::RunningOnValgrind
() {
33
return
false
;
34
}
35
36
void
llvm::sys::ValgrindDiscardTranslations
(
const
void
*
Addr
,
size_t
Len) {
37
}
38
39
#endif
// !HAVE_VALGRIND_VALGRIND_H
Addr
uint64_t Addr
Definition:
ELFObjHandler.cpp:79
Valgrind.h
llvm::sys::RunningOnValgrind
bool RunningOnValgrind()
Definition:
Valgrind.cpp:32
llvm::sys::ValgrindDiscardTranslations
void ValgrindDiscardTranslations(const void *Addr, size_t Len)
Definition:
Valgrind.cpp:36
Generated on Tue Apr 1 2025 06:27:25 for LLVM by
1.9.6