[PATCH] D52033: [GCOV] Add options to filter files which must be instrumented.
Marco Castelluccio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 04:20:01 PDT 2018
marco-c accepted this revision.
marco-c added inline comments.
This revision is now accepted and ready to land.
================
Comment at: include/llvm/Transforms/Instrumentation.h:69
+ // Regex separated by a comma to filter the files to instrument.
+ std::string Filter;
+
----------------
Nit: maybe you could give a better name to these options, e.g. something like `FilterFiles` and `ExcludeFiles`.
================
Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:434
+std::vector<Regex> GCOVProfiler::createRegexFromFilterString(StringRef Filter) {
+ std::vector<Regex> Regexs;
----------------
Nit: the name is a little confusing as it makes it look like it only applied to `Filter` and not to `Exclude`
Maybe you could rename it simply `createRegexFromString`?
Repository:
rL LLVM
https://reviews.llvm.org/D52033
More information about the llvm-commits
mailing list