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

Peter Collingbourne peter at pcc.me.uk
Wed Jul 16 20:23:59 PDT 2014


> 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.

I would prefer not to. It seems to me that passing SpecialCaseLists around would give us a little more flexibility. For example, it would make it easier to accept ad-hoc entries on the command line, or do things like dynamically load ABI lists out of object files.

================
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] += "|";
----------------
Alexey Samsonov wrote:
> 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.
Okay, I'll change this to use one regexp per entry. It doesn't seem like we were getting much benefit out of having a single regexp for all entries, given the poor performance I was seeing before.

http://reviews.llvm.org/D4546






More information about the llvm-commits mailing list