| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | #ifndef LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H |
| 14 | #define LLVM_CLANG_BASIC_SANITIZERBLACKLIST_H |
| 15 | |
| 16 | #include "clang/Basic/LLVM.h" |
| 17 | #include "clang/Basic/SanitizerSpecialCaseList.h" |
| 18 | #include "clang/Basic/Sanitizers.h" |
| 19 | #include "clang/Basic/SourceLocation.h" |
| 20 | #include "clang/Basic/SourceManager.h" |
| 21 | #include "llvm/ADT/StringRef.h" |
| 22 | #include <memory> |
| 23 | |
| 24 | namespace clang { |
| 25 | |
| 26 | class SanitizerBlacklist { |
| 27 | std::unique_ptr<SanitizerSpecialCaseList> SSCL; |
| 28 | SourceManager &SM; |
| 29 | |
| 30 | public: |
| 31 | SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths, |
| 32 | SourceManager &SM); |
| 33 | bool isBlacklistedGlobal(SanitizerMask Mask, StringRef GlobalName, |
| 34 | StringRef Category = StringRef()) const; |
| 35 | bool isBlacklistedType(SanitizerMask Mask, StringRef MangledTypeName, |
| 36 | StringRef Category = StringRef()) const; |
| 37 | bool isBlacklistedFunction(SanitizerMask Mask, StringRef FunctionName) const; |
| 38 | bool isBlacklistedFile(SanitizerMask Mask, StringRef FileName, |
| 39 | StringRef Category = StringRef()) const; |
| 40 | bool isBlacklistedLocation(SanitizerMask Mask, SourceLocation Loc, |
| 41 | StringRef Category = StringRef()) const; |
| 42 | }; |
| 43 | |
| 44 | } |
| 45 | |
| 46 | #endif |
| 47 | |