summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Darwin.cpp
diff options
context:
space:
mode:
authorPierre Gousseau <pierregousseau14@gmail.com>2019-04-12 14:14:58 +0000
committerPierre Gousseau <pierregousseau14@gmail.com>2019-04-12 14:14:58 +0000
commit1e39fc1faa5d8e27877eff45b2b9839c94e5d12e (patch)
treedd7e164b5558f7f74eb9c44731801d8849e6d4d2 /clang/lib/Driver/ToolChains/Darwin.cpp
parentce0a88a5e1b2bfa334331b5066bb65bd4ff75bcb (diff)
downloadbcm5719-llvm-1e39fc1faa5d8e27877eff45b2b9839c94e5d12e.tar.gz
bcm5719-llvm-1e39fc1faa5d8e27877eff45b2b9839c94e5d12e.zip
[asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract.
Disabled by default as this is still an experimental feature. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D59221 llvm-svn: 358285
Diffstat (limited to 'clang/lib/Driver/ToolChains/Darwin.cpp')
-rw-r--r--clang/lib/Driver/ToolChains/Darwin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index e113f9a679e..344143668b3 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -2375,6 +2375,8 @@ SanitizerMask Darwin::getSupportedSanitizers() const {
const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
SanitizerMask Res = ToolChain::getSupportedSanitizers();
Res |= SanitizerKind::Address;
+ Res |= SanitizerKind::PointerCompare;
+ Res |= SanitizerKind::PointerSubtract;
Res |= SanitizerKind::Leak;
Res |= SanitizerKind::Fuzzer;
Res |= SanitizerKind::FuzzerNoLink;
OpenPOWER on IntegriCloud