summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-11-07 22:29:38 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-11-07 22:29:38 +0000
commitedf99a92c00193fb72f3e94f4440b9f86789cca4 (patch)
tree38223e591da34506e9f12ad46d6fcf7fc985cd61 /clang/lib/Basic/Targets.cpp
parentea0a4dfd2764d4b57366e104477467723c1acb4c (diff)
downloadbcm5719-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/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 2f343040890..61f0a530864 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -94,7 +94,8 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
Builder.defineMacro("OBJC_NEW_PROPERTIES");
// AddressSanitizer doesn't play well with source fortification, which is on
// by default on Darwin.
- if (Opts.Sanitize.Address) Builder.defineMacro("_FORTIFY_SOURCE", "0");
+ if (Opts.Sanitize.has(SanitizerKind::Address))
+ Builder.defineMacro("_FORTIFY_SOURCE", "0");
if (!Opts.ObjCAutoRefCount) {
// __weak is always defined, for use in blocks and with objc pointers.
OpenPOWER on IntegriCloud