1 //===-- tsan_suppressions.h -------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file is a part of ThreadSanitizer (TSan), a race detector. 11 // 12 //===----------------------------------------------------------------------===// 13 #ifndef TSAN_SUPPRESSIONS_H 14 #define TSAN_SUPPRESSIONS_H 15 16 #include "tsan_report.h" 17 18 namespace __tsan { 19 20 void InitializeSuppressions(); 21 void FinalizeSuppressions(); 22 uptr IsSuppressed(ReportType typ, const ReportStack *stack); 23 24 // Exposed for testing. 25 enum SuppressionType { 26 SuppressionRace, 27 SuppressionMutex, 28 SuppressionThread, 29 SuppressionSignal 30 }; 31 32 struct Suppression { 33 Suppression *next; 34 SuppressionType type; 35 char *templ; 36 }; 37 38 Suppression *SuppressionParse(Suppression *head, const char* supp); 39 bool SuppressionMatch(char *templ, const char *str); 40 41 } // namespace __tsan 42 43 #endif // TSAN_SUPPRESSIONS_H 44