summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Sanitizers.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-06-17 22:07:28 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-06-17 22:07:28 +0000
commit9170efdc0d6274b0d7438dcee929243fcca77e95 (patch)
tree1ad88f95c7dbe0a1391d845f4d6d3093ec761e96 /clang/lib/Basic/Sanitizers.cpp
parente0d4037c6a0bcbdadf080e7a2ccd9846370d5f4c (diff)
downloadbcm5719-llvm-9170efdc0d6274b0d7438dcee929243fcca77e95.tar.gz
bcm5719-llvm-9170efdc0d6274b0d7438dcee929243fcca77e95.zip
[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.
Summary: Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support (i.e. set from -fsanitize=undefined-trap). Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539) Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith Differential Revision: http://reviews.llvm.org/D10467 llvm-svn: 239953
Diffstat (limited to 'clang/lib/Basic/Sanitizers.cpp')
-rw-r--r--clang/lib/Basic/Sanitizers.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/Sanitizers.cpp b/clang/lib/Basic/Sanitizers.cpp
index 8c4884b8ec3..527d7f0c70e 100644
--- a/clang/lib/Basic/Sanitizers.cpp
+++ b/clang/lib/Basic/Sanitizers.cpp
@@ -56,3 +56,9 @@ SanitizerMask clang::expandSanitizerGroups(SanitizerMask Kinds) {
#include "clang/Basic/Sanitizers.def"
return Kinds;
}
+
+SanitizerMask clang::getSanitizersWithNoRequiredRuntime() {
+ return SanitizerKind::UndefinedTrap | SanitizerKind::CFI |
+ SanitizerKind::CFICastStrict | SanitizerKind::UnsignedIntegerOverflow |
+ SanitizerKind::LocalBounds;
+}
OpenPOWER on IntegriCloud