blob: 46f804b85332ac3b780c07a73cd01d017e3aa49f [file] [log] [blame]
Ian Hodson2ee91b42012-05-14 12:29:36 +01001// Copyright 2009 The RE2 Authors. All Rights Reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5#include "util/util.h"
6#include "util/valgrind.h"
7
8namespace re2 {
9
Alexander Gutkin0d4c5232013-02-28 13:47:27 +000010int RunningOnValgrind() {
Ian Hodson2ee91b42012-05-14 12:29:36 +010011#ifdef RUNNING_ON_VALGRIND
12 return RUNNING_ON_VALGRIND;
13#else
Alexander Gutkin0d4c5232013-02-28 13:47:27 +000014 return 0;
Ian Hodson2ee91b42012-05-14 12:29:36 +010015#endif
16}
17
Ian Hodson2ee91b42012-05-14 12:29:36 +010018} // namespace re2