OSDN Git Service

[ASan] Support comments in ASan/TSan blacklist file as lines starting with #
authorAlexey Samsonov <samsonov@google.com>
Fri, 19 Oct 2012 15:24:46 +0000 (15:24 +0000)
committerAlexey Samsonov <samsonov@google.com>
Fri, 19 Oct 2012 15:24:46 +0000 (15:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166283 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/BlackList.cpp
lib/Transforms/Instrumentation/BlackList.h

index 2cb1199..ef34b8a 100644 (file)
@@ -45,6 +45,9 @@ BlackList::BlackList(const StringRef Path) {
   StringMap<std::string> Regexps;
   for (SmallVector<StringRef, 16>::iterator I = Lines.begin(), E = Lines.end();
        I != E; ++I) {
+    // Ignore empty lines and lines starting with "#"
+    if (I->empty() || I->startswith("#"))
+      continue;
     // Get our prefix and unparsed regexp.
     std::pair<StringRef, StringRef> SplitLine = I->split(":");
     StringRef Prefix = SplitLine.first;
index 73977fc..f3c05a5 100644 (file)
@@ -12,7 +12,9 @@
 //
 // The blacklist disables instrumentation of various functions and global
 // variables.  Each line contains a prefix, followed by a wild card expression.
+// Empty lines and lines starting with "#" are ignored.
 // ---
+// # Blacklisted items:
 // fun:*_ZN4base6subtle*
 // global:*global_with_bad_access_or_initialization*
 // global-init:*global_with_initialization_issues*