diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-02-19 11:25:29 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-02-19 11:25:29 +0000 |
commit | 24697b0a7297f530822dac42e36feb77738c1885 (patch) | |
tree | ea6cea122b82161cdcb23d0ea2112365ef00f4fa /lib/Driver/Tools.cpp | |
parent | aad3fa661914ac90e64f7eafb72f848e9bd117cd (diff) |
[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang look for the default sanitizer-specific blacklist in the resource directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ba61292acc..ad4fd6cd53 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1543,6 +1543,14 @@ SanitizerArgs::SanitizerArgs(const Driver &D, const ArgList &Args) else D.Diag(diag::err_drv_no_such_file) << BLPath; } + } else { + // If no -fsanitize-blacklist option is specified, try to look up for + // blacklist in the resource directory. + std::string BLPath; + bool BLExists = false; + if (getDefaultBlacklistForKind(D, Kind, BLPath) && + !llvm::sys::fs::exists(BLPath, BLExists) && BLExists) + BlacklistFile = BLPath; } // Parse -f(no-)sanitize-memory-track-origins options. |