1//===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- 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// User-provided blacklist used to disable/alter instrumentation done in
11// sanitizers.
12//
13//===----------------------------------------------------------------------===//
14#ifndef CLANG_CODEGEN_SANITIZERBLACKLIST_H
15#define CLANG_CODEGEN_SANITIZERBLACKLIST_H
16
17#include "clang/Basic/LLVM.h"
18#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/SpecialCaseList.h"
20#include <memory>
21
22namespace llvm {
23class GlobalVariable;
24class Function;
25class Module;
26}
27
28namespace clang {
29namespace CodeGen {
30
31class SanitizerBlacklist {
32  std::unique_ptr<llvm::SpecialCaseList> SCL;
33
34public:
35  SanitizerBlacklist(llvm::SpecialCaseList *SCL) : SCL(SCL) {}
36  bool isIn(const llvm::Module &M,
37            const StringRef Category = StringRef()) const;
38  bool isIn(const llvm::Function &F) const;
39  bool isIn(const llvm::GlobalVariable &G,
40            const StringRef Category = StringRef()) const;
41};
42}  // end namespace CodeGen
43}  // end namespace clang
44
45#endif
46