blob: 868b331f2f364d63e95b89151d369f5b9a82d805 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//===--- Sanitizers.h - C Language Family Language Options ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Defines the clang::SanitizerKind enum.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_BASIC_SANITIZERS_H
#define LLVM_CLANG_BASIC_SANITIZERS_H
namespace clang {
enum class SanitizerKind {
#define SANITIZER(NAME, ID) ID,
#include "clang/Basic/Sanitizers.def"
Unknown
};
class SanitizerSet {
/// \brief Bitmask of enabled sanitizers.
unsigned Kinds;
public:
SanitizerSet();
/// \brief Check if a certain sanitizer is enabled.
bool has(SanitizerKind K) const;
/// \brief Enable or disable a certain sanitizer.
void set(SanitizerKind K, bool Value);
/// \brief Disable all sanitizers.
void clear();
/// \brief Returns true if at least one sanitizer is enabled.
bool empty() const;
};
} // end namespace clang
#endif
|