summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2018-04-13 18:05:21 +0000
committerAndrey Konovalov <andreyknvl@google.com>2018-04-13 18:05:21 +0000
commit1ba9d9c6ca1ffeef7e833261ebca463a92adf82f (patch)
tree411cffebc58e2bb1b52c646829e63fd4e951c439 /clang/lib/Lex
parent24fff2429cb612dfe4293ccb93e664f02671ef8a (diff)
downloadbcm5719-llvm-1ba9d9c6ca1ffeef7e833261ebca463a92adf82f.tar.gz
bcm5719-llvm-1ba9d9c6ca1ffeef7e833261ebca463a92adf82f.zip
hwasan: add -fsanitize=kernel-hwaddress flag
This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff. Differential Revision: https://reviews.llvm.org/D45046 llvm-svn: 330044
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 5af8ba57241..aa8414f8589 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -1105,7 +1105,8 @@ static bool HasFeature(const Preprocessor &PP, StringRef Feature) {
LangOpts.Sanitize.hasOneOf(SanitizerKind::Address |
SanitizerKind::KernelAddress))
.Case("hwaddress_sanitizer",
- LangOpts.Sanitize.hasOneOf(SanitizerKind::HWAddress))
+ LangOpts.Sanitize.hasOneOf(SanitizerKind::HWAddress |
+ SanitizerKind::KernelHWAddress))
.Case("assume_nonnull", true)
.Case("attribute_analyzer_noreturn", true)
.Case("attribute_availability", true)
OpenPOWER on IntegriCloud