diff options
| author | Alexey Samsonov <vonosmas@gmail.com> | 2015-02-19 22:56:47 +0000 |
|---|---|---|
| committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-02-19 22:56:47 +0000 |
| commit | d2c20c49f81f1fcf7257ea8c8a1522e1a2b36619 (patch) | |
| tree | e55f7b0cbb92729ae4d1d283042f5287627b7577 /compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc | |
| parent | 97cbed422c3dde90347df519abe5f8ba663158a8 (diff) | |
| download | bcm5719-llvm-d2c20c49f81f1fcf7257ea8c8a1522e1a2b36619.tar.gz bcm5719-llvm-d2c20c49f81f1fcf7257ea8c8a1522e1a2b36619.zip | |
[Sanitizer] Move TemplateMatch() to sanitizer_common.cc. NFC.
llvm-svn: 229923
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc b/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc index 6b75036c7e5..ec4789c90f2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc @@ -26,48 +26,6 @@ static const char *const kTypeStrings[SuppressionTypeCount] = { "deadlock", "vptr_check", "interceptor_name", "interceptor_via_fun", "interceptor_via_lib"}; -bool TemplateMatch(char *templ, const char *str) { - if (str == 0 || str[0] == 0) - return false; - bool start = false; - if (templ && templ[0] == '^') { - start = true; - templ++; - } - bool asterisk = false; - while (templ && templ[0]) { - if (templ[0] == '*') { - templ++; - start = false; - asterisk = true; - continue; - } - if (templ[0] == '$') - return str[0] == 0 || asterisk; - if (str[0] == 0) - return false; - char *tpos = (char*)internal_strchr(templ, '*'); - char *tpos1 = (char*)internal_strchr(templ, '$'); - if (tpos == 0 || (tpos1 && tpos1 < tpos)) - tpos = tpos1; - if (tpos != 0) - tpos[0] = 0; - const char *str0 = str; - const char *spos = internal_strstr(str, templ); - str = spos + internal_strlen(templ); - templ = tpos; - if (tpos) - tpos[0] = tpos == tpos1 ? '$' : '*'; - if (spos == 0) - return false; - if (start && spos != str0) - return false; - start = false; - asterisk = false; - } - return true; -} - ALIGNED(64) static char placeholder[sizeof(SuppressionContext)]; static SuppressionContext *suppression_ctx = 0; |

