diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-11-07 22:29:38 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-11-07 22:29:38 +0000 |
commit | edf99a92c00193fb72f3e94f4440b9f86789cca4 (patch) | |
tree | 38223e591da34506e9f12ad46d6fcf7fc985cd61 /clang/lib/Serialization/ASTWriter.cpp | |
parent | ea0a4dfd2764d4b57366e104477467723c1acb4c (diff) | |
download | bcm5719-llvm-edf99a92c00193fb72f3e94f4440b9f86789cca4.tar.gz bcm5719-llvm-edf99a92c00193fb72f3e94f4440b9f86789cca4.zip |
Introduce a SanitizerKind enum to LangOptions.
Use the bitmask to store the set of enabled sanitizers instead of a
bitfield. On the negative side, it makes syntax for querying the
set of enabled sanitizers a bit more clunky. On the positive side, we
will be able to use SanitizerKind to eventually implement the
new semantics for -fsanitize-recover= flag, that would allow us
to make some sanitizers recoverable, and some non-recoverable.
No functionality change.
llvm-svn: 221558
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 000a7a9001f..3f6d4fc6cce 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -1203,8 +1203,9 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context, Record.push_back(LangOpts.Name); #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ Record.push_back(static_cast<unsigned>(LangOpts.get##Name())); -#include "clang/Basic/LangOptions.def" -#define SANITIZER(NAME, ID) Record.push_back(LangOpts.Sanitize.ID); +#include "clang/Basic/LangOptions.def" +#define SANITIZER(NAME, ID) \ + Record.push_back(LangOpts.Sanitize.has(SanitizerKind::ID)); #include "clang/Basic/Sanitizers.def" Record.push_back((unsigned) LangOpts.ObjCRuntime.getKind()); |