[PATCH] [RFC] Introduce support for multiple sanitizer blacklists (LLVM side).

Alexey Samsonov vonosmas at gmail.com
Wed Jul 16 16:10:29 PDT 2014


I'm fine with general direction of this patch. Having multiple blacklists for different parts of code base looks like a legit use case. 

I don't like proliferation of std::unique_ptr across interfaces, though. I would prefer to have them more lightweight. Can we add one more factory:
  llvm::SpecialCaseList::createOrDie(const std::vector<std::string> &Paths);
In this case Clang's BackendUtil won't have to bother about creating SpecialCaseList - it will just pass CGOpts.SanitizerBlacklistFiles to the DFSan instrumentation pass.

================
Comment at: lib/Support/SpecialCaseList.cpp:137
@@ -139,3 +136,3 @@
     // Add this regexp into the proper group by its prefix.
     if (!Regexps[Prefix][Category].empty())
       Regexps[Prefix][Category] += "|";
----------------
You're now using a vector of Regexps. Either use "|" (as done here) to merge them into a single Regexp, or use push_back everywhere.

http://reviews.llvm.org/D4546






More information about the llvm-commits mailing list