summaryrefslogtreecommitdiffstats
path: root/third_party/re2/util/valgrind.cc
blob: 749bb59667304d276df0da3c3764a2b167c5bcad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2009 The RE2 Authors.  All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#include "util/util.h"
#include "util/valgrind.h"

namespace re2 {

static bool checkValgrind() {
#ifdef RUNNING_ON_VALGRIND
	return RUNNING_ON_VALGRIND;
#else
	return false;
#endif
}

static const int valgrind = checkValgrind();

int RunningOnValgrind() {
  return valgrind;
}

}  // namespace re2