[PATCH] [sanitizer] Factor some suppression-related code out of TSan. This code will be reused in LSan.

Dmitry Vyukov dvyukov at google.com
Mon Jun 24 11:12:09 PDT 2013



================
Comment at: lib/tsan/rtl/tsan_suppressions.cc:67
@@ -64,23 +66,3 @@
 
-bool SuppressionMatch(char *templ, const char *str) {
-  if (str == 0 || str[0] == 0)
-    return false;
-  char *tpos;
-  const char *spos;
-  while (templ && templ[0]) {
-    if (templ[0] == '*') {
-      templ++;
-      continue;
-    }
-    if (str[0] == 0)
-      return false;
-    tpos = (char*)internal_strchr(templ, '*');
-    if (tpos != 0)
-      tpos[0] = 0;
-    spos = internal_strstr(str, templ);
-    str = spos + internal_strlen(templ);
-    templ = tpos;
-    if (tpos)
-      tpos[0] = '*';
-    if (spos == 0)
-      return false;
+Suppression *SuppressionParse(Suppression *head, const char* line) {
+  while (true) {
----------------
as per offline discussion, please move this into sanitizer_common as well


http://llvm-reviews.chandlerc.com/D1031



More information about the llvm-commits mailing list