diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-10-19 15:24:46 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-10-19 15:24:46 +0000 |
commit | 34674fea970b20dde4336a06a12732211d1cfa04 (patch) | |
tree | ffa5226b8751c649dc0e99071207be949dc43bba /lib/Transforms/Instrumentation/BlackList.cpp | |
parent | 4a2dec05cef5882b745dd248d79e42a42cdbc87b (diff) | |
download | external_llvm-34674fea970b20dde4336a06a12732211d1cfa04.zip external_llvm-34674fea970b20dde4336a06a12732211d1cfa04.tar.gz external_llvm-34674fea970b20dde4336a06a12732211d1cfa04.tar.bz2 |
[ASan] Support comments in ASan/TSan blacklist file as lines starting with #
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/BlackList.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/BlackList.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/BlackList.cpp b/lib/Transforms/Instrumentation/BlackList.cpp index 2cb1199..ef34b8a 100644 --- a/lib/Transforms/Instrumentation/BlackList.cpp +++ b/lib/Transforms/Instrumentation/BlackList.cpp @@ -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; |