]> granicus.if.org Git - clang/commit
[Sanitizer] Refactor sanitizer options in LangOptions.
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 11 Nov 2014 01:26:14 +0000 (01:26 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 11 Nov 2014 01:26:14 +0000 (01:26 +0000)
commitedab6ac0eb32d6a47259c850dbbb6379757e16ff
treea7a4cd245e6454bfd138084aaaebc66d5b7b5c26
parent98feb8146b4077bb70ba7cfc443263a0121fdd0a
[Sanitizer] Refactor sanitizer options in LangOptions.

Get rid of ugly SanitizerOptions class thrust into LangOptions:
* Make SanitizeAddressFieldPadding a regular language option,
  and rely on default behavior to initialize/reset it.
* Make SanitizerBlacklistFile a regular member LangOptions.
* Introduce the helper class "SanitizerSet" to represent the
  set of enabled sanitizers and make it a member of LangOptions.
  It is exactly the entity we want to cache and modify in CodeGenFunction,
  for instance. We'd also be able to reuse SanitizerSet in
  CodeGenOptions for storing the set of recoverable sanitizers,
  and in the Driver to represent the set of sanitizers
  turned on/off by the commandline flags.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221653 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Basic/LangOptions.def
include/clang/Basic/LangOptions.h
include/clang/Basic/Sanitizers.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/Basic/CMakeLists.txt
lib/Basic/LangOptions.cpp
lib/Basic/Sanitizers.cpp [new file with mode: 0644]
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CodeGenFunction.h
lib/Frontend/CompilerInvocation.cpp