Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/re2/util/valgrind.cc

Issue 10575037: Include RE2 library (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Less intrusive fix for Android Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/re2/util/valgrind.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/util/valgrind.cc
diff --git a/third_party/re2/util/valgrind.cc b/third_party/re2/util/valgrind.cc
new file mode 100644
index 0000000000000000000000000000000000000000..749bb59667304d276df0da3c3764a2b167c5bcad
--- /dev/null
+++ b/third_party/re2/util/valgrind.cc
@@ -0,0 +1,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
« no previous file with comments | « third_party/re2/util/valgrind.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698