diff options
| author | Fangrui Song <i@maskray.me> | 2022-08-01 18:53:20 -0700 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2022-08-01 18:53:20 -0700 |
| commit | 1c52b4f798de54e2945867f2d8040ada773fa7eb (patch) | |
| tree | c31bdb6ed08c6e9b32bda40c672295d14b548e0e /llvm/tools/llvm-cov/CodeCoverage.cpp | |
| parent | 9bf6eccae112476d953180e814781b99237bd0bb (diff) | |
| download | llvm-1c52b4f798de54e2945867f2d8040ada773fa7eb.zip llvm-1c52b4f798de54e2945867f2d8040ada773fa7eb.tar.gz llvm-1c52b4f798de54e2945867f2d8040ada773fa7eb.tar.bz2 | |
[llvm-cov] Remove deprecated -name-whitelist after D112816
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
| -rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index 13b6c30..c963a60 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -671,13 +671,6 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) { "file"), cl::cat(FilteringCategory)); - // Allow for accepting previous option name. - cl::list<std::string> NameFilterFilesDeprecated( - "name-whitelist", cl::Optional, cl::Hidden, - cl::desc("Show code coverage only for functions listed in the given " - "file. Deprecated, use -name-allowlist instead"), - cl::cat(FilteringCategory)); - cl::list<std::string> NameRegexFilters( "name-regex", cl::Optional, cl::desc("Show code coverage only for functions that match the given " @@ -815,16 +808,10 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) { } // Read in -name-allowlist files. - if (!NameFilterFiles.empty() || !NameFilterFilesDeprecated.empty()) { + if (!NameFilterFiles.empty()) { std::string SpecialCaseListErr; - if (!NameFilterFiles.empty()) - NameAllowlist = SpecialCaseList::create( - NameFilterFiles, *vfs::getRealFileSystem(), SpecialCaseListErr); - if (!NameFilterFilesDeprecated.empty()) - NameAllowlist = SpecialCaseList::create(NameFilterFilesDeprecated, - *vfs::getRealFileSystem(), - SpecialCaseListErr); - + NameAllowlist = SpecialCaseList::create( + NameFilterFiles, *vfs::getRealFileSystem(), SpecialCaseListErr); if (!NameAllowlist) error(SpecialCaseListErr); } @@ -834,14 +821,9 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) { auto NameFilterer = std::make_unique<CoverageFilters>(); for (const auto &Name : NameFilters) NameFilterer->push_back(std::make_unique<NameCoverageFilter>(Name)); - if (NameAllowlist) { - if (!NameFilterFiles.empty()) - NameFilterer->push_back( - std::make_unique<NameAllowlistCoverageFilter>(*NameAllowlist)); - if (!NameFilterFilesDeprecated.empty()) - NameFilterer->push_back( - std::make_unique<NameWhitelistCoverageFilter>(*NameAllowlist)); - } + if (NameAllowlist && !NameFilterFiles.empty()) + NameFilterer->push_back( + std::make_unique<NameAllowlistCoverageFilter>(*NameAllowlist)); for (const auto &Regex : NameRegexFilters) NameFilterer->push_back( std::make_unique<NameRegexCoverageFilter>(Regex)); |
