[PATCH] SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.
Alexey Samsonov
samsonov at google.com
Wed Oct 23 21:13:10 PDT 2013
================
Comment at: lib/Driver/SanitizerArgs.cpp:245
@@ +244,3 @@
+ TC.getTriple().getArch() == llvm::Triple::x86_64)) {
+ filterUnsupportedKind(TC, Kinds, Memory, "-fsanitize=memory",
+ DiagnoseErrors);
----------------
-fsanitize=thread is also unsupported in this case.
================
Comment at: lib/Driver/ToolChains.cpp:300
@@ -299,3 +299,3 @@
if (Sanitize.needsUbsanRt()) {
if (isTargetIPhoneOS()) {
getDriver().Diag(diag::err_drv_clang_unsupported_per_platform)
----------------
Can you move this piece to filterUnsupportedKinds?
================
Comment at: lib/Driver/ToolChains.cpp:314
@@ -313,3 +313,3 @@
if (Sanitize.needsAsanRt()) {
if (isTargetIPhoneOS() && !isTargetIOSSimulator()) {
getDriver().Diag(diag::err_drv_clang_unsupported_per_platform)
----------------
Can you move this piece to filterUnsupportedKinds?
================
Comment at: lib/Driver/SanitizerArgs.cpp:231
@@ +230,3 @@
+ bool DiagnoseErrors) {
+ if (Kinds & Kind) {
+ Kinds &= ~Kind;
----------------
Do an early return here instead.
http://llvm-reviews.chandlerc.com/D1990
More information about the cfe-commits
mailing list