Home | History | Annotate | Download | only in util
      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() {
     21   return valgrind;
     22 }
     23 
     24 }  // namespace re2
     25