remove-valgrind-code.patch revision 5821806d5e7f356e8fa4b058a389a808ea183019
1diff --git a/third_party/re2/re2/dfa.cc b/third_party/re2/re2/dfa.cc 2index 3a6a387..32c8c33 100644 3--- a/third_party/re2/re2/dfa.cc 4+++ b/third_party/re2/re2/dfa.cc 5@@ -27,6 +27,8 @@ 6 #include "util/flags.h" 7 #include "util/sparse_set.h" 8 9+#define NO_THREAD_SAFETY_ANALYSIS 10+ 11 DEFINE_bool(re2_dfa_bail_when_slow, true, 12 "Whether the RE2 DFA should bail out early " 13 "if the NFA would be faster (for testing)."); 14diff --git a/third_party/re2/util/util.h b/third_party/re2/util/util.h 15index a43ff76..63a9c6f 100644 16--- a/third_party/re2/util/util.h 17+++ b/third_party/re2/util/util.h 18@@ -26,6 +26,8 @@ 19 #include <utility> 20 #include <set> 21 22+#include "base/third_party/dynamic_annotations/dynamic_annotations.h" 23+ 24 // Use std names. 25 using std::set; 26 using std::pair; 27@@ -80,17 +82,6 @@ template<bool> struct CompileAssert {}; 28 29 #define arraysize(array) (sizeof(array)/sizeof((array)[0])) 30 31-// Fake lock annotations. For real ones, see 32-// http://code.google.com/p/data-race-test/ 33-#define ANNOTATE_PUBLISH_MEMORY_RANGE(a, b) 34-#define ANNOTATE_IGNORE_WRITES_BEGIN() 35-#define ANNOTATE_IGNORE_WRITES_END() 36-#define ANNOTATE_BENIGN_RACE(a, b) 37-#define NO_THREAD_SAFETY_ANALYSIS 38-#define ANNOTATE_HAPPENS_BEFORE(x) 39-#define ANNOTATE_HAPPENS_AFTER(x) 40-#define ANNOTATE_UNPROTECTED_READ(x) (x) 41- 42 class StringPiece; 43 44 string CEscape(const StringPiece& src); 45@@ -116,8 +107,6 @@ static inline uint64 Hash64StringWithSeed(const char* s, int len, uint32 seed) { 46 return ((uint64)x << 32) | y; 47 } 48 49-int RunningOnValgrind(); 50- 51 } // namespace re2 52 53 #include "util/arena.h" 54