1 // 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
8 namespace re2 {
9
10 static bool checkValgrind() {
11 #ifdef RUNNING_ON_VALGRIND
12 return RUNNING_ON_VALGRIND;
13 #else
14 return false;
15 #endif
16 }
17
18 static const int valgrind = checkValgrind();
19
20 int RunningOnValgrind() {
Alexander Potapenko
2012/07/02 13:45:35
Note that Chromium is already using RunningOnValgr
Note that Chromium is already using RunningOnValgrind declared in
base/third_party/dynamic_annotations/dynamic_annotations.c.
It doesn't conflict with re2::RunningOnValgrind, but we certainly want to call
the existing function from re2 instead of adding another one.
On 2012/07/02 13:45:35, Alexander Potapenko wrote:
> Note that Chromium is already using RunningOnValgrind declared in
> base/third_party/dynamic_annotations/dynamic_annotations.c.
> It doesn't conflict with re2::RunningOnValgrind, but we certainly want to call
> the existing function from re2 instead of adding another one.
Issue 10575037: Include RE2 library
(Closed)
Created 8 years, 6 months ago by battre
Modified 7 years, 11 months ago
Reviewers: Aaron Boodman, Alexander Potapenko, Mark Mentovai, Ben Goodger (Google), Nico
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 8