Add a -name-whitelist option, which behaves in the same way as -name, but it reads in multiple function names from the given input file(s).
Details
Diff Detail
- Build Status
Buildable 9769 Build 9769: arc lint + arc unit
Event Timeline
test/tools/llvm-cov/Inputs/name_whitelist.cpp | ||
---|---|---|
19 | Just a reminder: please make sure that name_whitelist.covmapping is derived from an object built with -mllvm -enable-name-compression=false. I've been bitten by that before :) (not all the bots have zlib installed). | |
tools/llvm-cov/CodeCoverage.cpp | ||
656 | In the future, we might benefit from the flexibility offered by llvm::SpecialCaseList. Could you use that to parse the whitelist? |
tools/llvm-cov/CodeCoverage.cpp | ||
---|---|---|
656 | Thanks for the review! Having to specify a section for each item seems redundant for an option that only filters on function names, e.g. fun:foo fun:bar Are you considering having a more general -whitelist rather than a -name-whitelist? Otherwise I'm not sure what other sections there would be. The wildcard handling would be useful though. |
tools/llvm-cov/CodeCoverage.cpp | ||
---|---|---|
656 | I agree that it's a little redundant, but think that it shouldn't be too onerous. E.g the section names can be added in by a quick shell one-liner. The potential benefit is that you can have one file for {white, black}listing {functions, files, directories}. To that end, I suggest using more specific section names like "whitelist_fun:". |
Just a reminder: please make sure that name_whitelist.covmapping is derived from an object built with -mllvm -enable-name-compression=false. I've been bitten by that before :) (not all the bots have zlib installed).