r221959 - Cleanup SanitizerArgs: get rid of unused variable, make one method non-static. NFC.
Alexey Samsonov
vonosmas at gmail.com
Thu Nov 13 16:46:39 PST 2014
Author: samsonov
Date: Thu Nov 13 18:46:39 2014
New Revision: 221959
URL: http://llvm.org/viewvc/llvm-project?rev=221959&view=rev
Log:
Cleanup SanitizerArgs: get rid of unused variable, make one method non-static. NFC.
Modified:
cfe/trunk/include/clang/Driver/SanitizerArgs.h
cfe/trunk/lib/Driver/SanitizerArgs.cpp
Modified: cfe/trunk/include/clang/Driver/SanitizerArgs.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/SanitizerArgs.h?rev=221959&r1=221958&r2=221959&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/SanitizerArgs.h (original)
+++ cfe/trunk/include/clang/Driver/SanitizerArgs.h Thu Nov 13 18:46:39 2014
@@ -86,6 +86,8 @@ class SanitizerArgs {
private:
void clear();
+ bool getDefaultBlacklist(const Driver &D, std::string &BLPath);
+
/// Parse a single value from a -fsanitize= or -fno-sanitize= value list.
/// Returns OR of members of the \c SanitizeKind enumeration, or \c 0
/// if \p Value is not known.
@@ -119,9 +121,6 @@ class SanitizerArgs {
const llvm::opt::Arg *A,
unsigned Mask);
- static bool getDefaultBlacklistForKind(const Driver &D, unsigned Kind,
- std::string &BLPath);
-
/// Return the smallest superset of sanitizer set \p Kinds such that each
/// member of each group whose flag is set in \p Kinds has its flag set in the
/// result.
Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/SanitizerArgs.cpp?rev=221959&r1=221958&r2=221959&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/SanitizerArgs.cpp (original)
+++ cfe/trunk/lib/Driver/SanitizerArgs.cpp Thu Nov 13 18:46:39 2014
@@ -36,8 +36,6 @@ void SanitizerArgs::clear() {
SanitizerArgs::SanitizerArgs(const ToolChain &TC,
const llvm::opt::ArgList &Args) {
clear();
- unsigned AllAdd = 0; // All kinds of sanitizers that were turned on
- // at least once (possibly, disabled further).
unsigned AllRemove = 0; // During the loop below, the accumulated set of
// sanitizers disabled by the current sanitizer
// argument or any argument after it.
@@ -51,7 +49,6 @@ SanitizerArgs::SanitizerArgs(const ToolC
continue;
(*I)->claim();
- AllAdd |= expandGroups(Add);
AllRemove |= expandGroups(Remove);
// Avoid diagnosing any sanitizer which is disabled later.
@@ -134,8 +131,7 @@ SanitizerArgs::SanitizerArgs(const ToolC
// If no -fsanitize-blacklist option is specified, try to look up for
// blacklist in the resource directory.
std::string BLPath;
- if (getDefaultBlacklistForKind(D, Kind, BLPath) &&
- llvm::sys::fs::exists(BLPath))
+ if (getDefaultBlacklist(D, BLPath) && llvm::sys::fs::exists(BLPath))
BlacklistFile = BLPath;
}
@@ -364,8 +360,7 @@ std::string SanitizerArgs::describeSanit
return "-fsanitize=" + Sanitizers;
}
-bool SanitizerArgs::getDefaultBlacklistForKind(const Driver &D, unsigned Kind,
- std::string &BLPath) {
+bool SanitizerArgs::getDefaultBlacklist(const Driver &D, std::string &BLPath) {
const char *BlacklistFile = nullptr;
if (Kind & NeedsAsanRt)
BlacklistFile = "asan_blacklist.txt";
More information about the cfe-commits
mailing list