Re: [PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white, black}list to -fsanitize-coverage-{allow,block}list

2020-06-20 Thread Eric Christopher via cfe-commits
On Fri, Jun 19, 2020 at 10:43 PM Fangrui Song via Phabricator <
revi...@reviews.llvm.org> wrote:

> MaskRay added inline comments.
>
>
> 
> Comment at: clang/docs/ClangCommandLineReference.rst:891
>
>  Restrict sanitizer coverage instrumentation exclusively to modules and
> functions that match the provided special case list, except the blacklisted
> ones
>
> 
> echristo wrote:
> > MaskRay wrote:
> > > echristo wrote:
> > > > MaskRay wrote:
> > > > > echristo wrote:
> > > > > > I'd remove the uses of blacklist and whitelist here and below.
> Just have the language and the documentation be for the new option.
> > > > > `clang-tblgen -gen-opt-docs` does not seem to provide a feature to
> hide an option. HelpHidden does not hide the option.
> > > > Please remove blacklist and whitelist from the option description.
> > > I can do that but the next person updating the documentation will add
> them back.
> > >
> > > I believe `clang-tblgen -gen-opt-docs` just doesn't have the feature.
> Maybe we can delete the old options earlier so that we don't need to worry
> about the documentation.
> > Ugh. Yes, I hope so too. Can you raise it on cfe-dev?
> I can but I need to understand more about `clang-tblgen -gen-opt-docs`
> first...
>
>
I meant deleting the old options :)

-eric
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-20 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2a4317bfb319: [SanitizeCoverage] Rename 
-fsanitize-coverage-{white,black}list to -fsanitizeā€¦ (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/include/clang/Driver/SanitizerArgs.h
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
  llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -200,10 +200,10 @@
 public:
   ModuleSanitizerCoverage(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const SpecialCaseList *Whitelist = nullptr,
-  const SpecialCaseList *Blacklist = nullptr)
-  : Options(OverrideFromCL(Options)), Whitelist(Whitelist),
-Blacklist(Blacklist) {}
+  const SpecialCaseList *Allowlist = nullptr,
+  const SpecialCaseList *Blocklist = nullptr)
+  : Options(OverrideFromCL(Options)), Allowlist(Allowlist),
+Blocklist(Blocklist) {}
   bool instrumentModule(Module , DomTreeCallback DTCallback,
 PostDomTreeCallback PDTCallback);
 
@@ -268,31 +268,31 @@
 
   SanitizerCoverageOptions Options;
 
-  const SpecialCaseList *Whitelist;
-  const SpecialCaseList *Blacklist;
+  const SpecialCaseList *Allowlist;
+  const SpecialCaseList *Blocklist;
 };
 
 class ModuleSanitizerCoverageLegacyPass : public ModulePass {
 public:
   ModuleSanitizerCoverageLegacyPass(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const std::vector  =
+  const std::vector  =
   std::vector(),
-  const std::vector  =
+  const std::vector  =
   std::vector())
   : ModulePass(ID), Options(Options) {
-if (WhitelistFiles.size() > 0)
-  Whitelist = SpecialCaseList::createOrDie(WhitelistFiles,
+if (AllowlistFiles.size() > 0)
+  Allowlist = SpecialCaseList::createOrDie(AllowlistFiles,
*vfs::getRealFileSystem());
-if (BlacklistFiles.size() > 0)
-  Blacklist = SpecialCaseList::createOrDie(BlacklistFiles,
+if (BlocklistFiles.size() > 0)
+  Blocklist = SpecialCaseList::createOrDie(BlocklistFiles,
*vfs::getRealFileSystem());
 initializeModuleSanitizerCoverageLegacyPassPass(
 *PassRegistry::getPassRegistry());
   }
   bool runOnModule(Module ) override {
-ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
- Blacklist.get());
+ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+ Blocklist.get());
 auto DTCallback = [this](Function ) -> const DominatorTree * {
   return >getAnalysis(F).getDomTree();
 };
@@ -314,16 +314,16 @@
 private:
   SanitizerCoverageOptions Options;
 
-  std::unique_ptr Whitelist;
-  std::unique_ptr Blacklist;
+  std::unique_ptr Allowlist;
+  std::unique_ptr Blocklist;
 };
 
 } // namespace
 
 PreservedAnalyses ModuleSanitizerCoveragePass::run(Module ,
ModuleAnalysisManager ) {
-  ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
-   Blacklist.get());
+  ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+   Blocklist.get());
   auto  = MAM.getResult(M).getManager();
   auto DTCallback = [](Function ) -> const DominatorTree * {
 return (F);
@@ -396,11 +396,11 @@
 Module , DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
   if (Options.CoverageType == SanitizerCoverageOptions::SCK_None)
 return false;
-  if (Whitelist &&
-  !Whitelist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Allowlist &&
+  !Allowlist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
-  if (Blacklist &&
-  Blacklist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Blocklist &&
+  Blocklist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
   C = &(M.getContext());
   DL = ();
@@ -639,9 +639,9 @@
   if (F.hasPersonalityFn() &&
   

[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments.



Comment at: clang/docs/ClangCommandLineReference.rst:891
 
 Restrict sanitizer coverage instrumentation exclusively to modules and 
functions that match the provided special case list, except the blacklisted ones
 

echristo wrote:
> MaskRay wrote:
> > echristo wrote:
> > > MaskRay wrote:
> > > > echristo wrote:
> > > > > I'd remove the uses of blacklist and whitelist here and below. Just 
> > > > > have the language and the documentation be for the new option.
> > > > `clang-tblgen -gen-opt-docs` does not seem to provide a feature to hide 
> > > > an option. HelpHidden does not hide the option.
> > > Please remove blacklist and whitelist from the option description.
> > I can do that but the next person updating the documentation will add them 
> > back.
> > 
> > I believe `clang-tblgen -gen-opt-docs` just doesn't have the feature. Maybe 
> > we can delete the old options earlier so that we don't need to worry about 
> > the documentation.
> Ugh. Yes, I hope so too. Can you raise it on cfe-dev?
I can but I need to understand more about `clang-tblgen -gen-opt-docs` first...

Very few people know how to regenerate the doc I think... 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 272237.
MaskRay marked 4 inline comments as done.
MaskRay added a comment.

Address comments


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/include/clang/Driver/SanitizerArgs.h
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
  llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -200,10 +200,10 @@
 public:
   ModuleSanitizerCoverage(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const SpecialCaseList *Whitelist = nullptr,
-  const SpecialCaseList *Blacklist = nullptr)
-  : Options(OverrideFromCL(Options)), Whitelist(Whitelist),
-Blacklist(Blacklist) {}
+  const SpecialCaseList *Allowlist = nullptr,
+  const SpecialCaseList *Blocklist = nullptr)
+  : Options(OverrideFromCL(Options)), Allowlist(Allowlist),
+Blocklist(Blocklist) {}
   bool instrumentModule(Module , DomTreeCallback DTCallback,
 PostDomTreeCallback PDTCallback);
 
@@ -268,31 +268,31 @@
 
   SanitizerCoverageOptions Options;
 
-  const SpecialCaseList *Whitelist;
-  const SpecialCaseList *Blacklist;
+  const SpecialCaseList *Allowlist;
+  const SpecialCaseList *Blocklist;
 };
 
 class ModuleSanitizerCoverageLegacyPass : public ModulePass {
 public:
   ModuleSanitizerCoverageLegacyPass(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const std::vector  =
+  const std::vector  =
   std::vector(),
-  const std::vector  =
+  const std::vector  =
   std::vector())
   : ModulePass(ID), Options(Options) {
-if (WhitelistFiles.size() > 0)
-  Whitelist = SpecialCaseList::createOrDie(WhitelistFiles,
+if (AllowlistFiles.size() > 0)
+  Allowlist = SpecialCaseList::createOrDie(AllowlistFiles,
*vfs::getRealFileSystem());
-if (BlacklistFiles.size() > 0)
-  Blacklist = SpecialCaseList::createOrDie(BlacklistFiles,
+if (BlocklistFiles.size() > 0)
+  Blocklist = SpecialCaseList::createOrDie(BlocklistFiles,
*vfs::getRealFileSystem());
 initializeModuleSanitizerCoverageLegacyPassPass(
 *PassRegistry::getPassRegistry());
   }
   bool runOnModule(Module ) override {
-ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
- Blacklist.get());
+ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+ Blocklist.get());
 auto DTCallback = [this](Function ) -> const DominatorTree * {
   return >getAnalysis(F).getDomTree();
 };
@@ -314,16 +314,16 @@
 private:
   SanitizerCoverageOptions Options;
 
-  std::unique_ptr Whitelist;
-  std::unique_ptr Blacklist;
+  std::unique_ptr Allowlist;
+  std::unique_ptr Blocklist;
 };
 
 } // namespace
 
 PreservedAnalyses ModuleSanitizerCoveragePass::run(Module ,
ModuleAnalysisManager ) {
-  ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
-   Blacklist.get());
+  ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+   Blocklist.get());
   auto  = MAM.getResult(M).getManager();
   auto DTCallback = [](Function ) -> const DominatorTree * {
 return (F);
@@ -396,11 +396,11 @@
 Module , DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
   if (Options.CoverageType == SanitizerCoverageOptions::SCK_None)
 return false;
-  if (Whitelist &&
-  !Whitelist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Allowlist &&
+  !Allowlist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
-  if (Blacklist &&
-  Blacklist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Blocklist &&
+  Blocklist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
   C = &(M.getContext());
   DL = ();
@@ -639,9 +639,9 @@
   if (F.hasPersonalityFn() &&
   isAsynchronousEHPersonality(classifyEHPersonality(F.getPersonalityFn(
 return;
-  if 

[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments.



Comment at: clang/docs/ClangCommandLineReference.rst:891
 
 Restrict sanitizer coverage instrumentation exclusively to modules and 
functions that match the provided special case list, except the blacklisted ones
 

MaskRay wrote:
> echristo wrote:
> > MaskRay wrote:
> > > echristo wrote:
> > > > I'd remove the uses of blacklist and whitelist here and below. Just 
> > > > have the language and the documentation be for the new option.
> > > `clang-tblgen -gen-opt-docs` does not seem to provide a feature to hide 
> > > an option. HelpHidden does not hide the option.
> > Please remove blacklist and whitelist from the option description.
> I can do that but the next person updating the documentation will add them 
> back.
> 
> I believe `clang-tblgen -gen-opt-docs` just doesn't have the feature. Maybe 
> we can delete the old options earlier so that we don't need to worry about 
> the documentation.
Ugh. Yes, I hope so too. Can you raise it on cfe-dev?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done.
MaskRay added inline comments.



Comment at: clang/docs/ClangCommandLineReference.rst:891
 
 Restrict sanitizer coverage instrumentation exclusively to modules and 
functions that match the provided special case list, except the blacklisted ones
 

echristo wrote:
> MaskRay wrote:
> > echristo wrote:
> > > I'd remove the uses of blacklist and whitelist here and below. Just have 
> > > the language and the documentation be for the new option.
> > `clang-tblgen -gen-opt-docs` does not seem to provide a feature to hide an 
> > option. HelpHidden does not hide the option.
> Please remove blacklist and whitelist from the option description.
I can do that but the next person updating the documentation will add them back.

I believe `clang-tblgen -gen-opt-docs` just doesn't have the feature. Maybe we 
can delete the old options earlier so that we don't need to worry about the 
documentation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.

Couple of inline comments then looks good to go. Thank you so much for your 
effort here.

-eric




Comment at: clang/docs/ClangCommandLineReference.rst:891
 
 Restrict sanitizer coverage instrumentation exclusively to modules and 
functions that match the provided special case list, except the blacklisted ones
 

MaskRay wrote:
> echristo wrote:
> > I'd remove the uses of blacklist and whitelist here and below. Just have 
> > the language and the documentation be for the new option.
> `clang-tblgen -gen-opt-docs` does not seem to provide a feature to hide an 
> option. HelpHidden does not hide the option.
Please remove blacklist and whitelist from the option description.



Comment at: 
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp:89
+
+/// Kept for compatibility.
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm 
-fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table 
-fsanitize-coverage-whitelist=al_bar.txt  
-fsanitize-coverage-blacklist=bl_bar.txt   2>&1 | not grep -f patterns.txt

Make a note that the options below ware deprecated and will be removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 6 inline comments as done.
MaskRay added inline comments.



Comment at: clang/docs/ClangCommandLineReference.rst:891
 
 Restrict sanitizer coverage instrumentation exclusively to modules and 
functions that match the provided special case list, except the blacklisted ones
 

echristo wrote:
> I'd remove the uses of blacklist and whitelist here and below. Just have the 
> language and the documentation be for the new option.
`clang-tblgen -gen-opt-docs` does not seem to provide a feature to hide an 
option. HelpHidden does not hide the option.



Comment at: clang/docs/SanitizerCoverage.rst:435
 Options
-  -blacklist= - Blacklist file (sanitizer blacklist 
format).
+  -blacklist= - Blocklist file (sanitizer blocklist 
format).
   -demangle   - Print demangled function name.

echristo wrote:
> blacklist here.
sancov is another tool that is not touched by this patch. It should be updated 
separately.



Comment at: clang/include/clang/Driver/Options.td:1002
 HelpText<"Restrict sanitizer coverage instrumentation exclusively to 
modules and functions that match the provided special case list, except the 
blacklisted ones">;
-def fsanitize_coverage_blacklist : Joined<["-"], 
"fsanitize-coverage-blacklist=">,
+def : Joined<["-"], "fsanitize-coverage-whitelist=">,
+  Group, Flags<[CoreOption, HelpHidden]>, 
Alias;

echristo wrote:
> Deprecate the option and comment it as such.
HelpHidden will hide the options from help.



Comment at: 
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp:2
+// Tests -fsanitize-coverage-allowlist=whitelist.txt and
+// -fsanitize-coverage-blocklist=blacklist.txt with libFuzzer-like coverage
 // options

echristo wrote:
> blacklist filename. probably want to change wl_* and bl_* below as well.
wl_ -> al_

bl_ can still mean blocklist.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 272209.
MaskRay marked an inline comment as done.
MaskRay added a comment.

Fix more words


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/include/clang/Driver/SanitizerArgs.h
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
  llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -200,10 +200,10 @@
 public:
   ModuleSanitizerCoverage(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const SpecialCaseList *Whitelist = nullptr,
-  const SpecialCaseList *Blacklist = nullptr)
-  : Options(OverrideFromCL(Options)), Whitelist(Whitelist),
-Blacklist(Blacklist) {}
+  const SpecialCaseList *Allowlist = nullptr,
+  const SpecialCaseList *Blocklist = nullptr)
+  : Options(OverrideFromCL(Options)), Allowlist(Allowlist),
+Blocklist(Blocklist) {}
   bool instrumentModule(Module , DomTreeCallback DTCallback,
 PostDomTreeCallback PDTCallback);
 
@@ -268,31 +268,31 @@
 
   SanitizerCoverageOptions Options;
 
-  const SpecialCaseList *Whitelist;
-  const SpecialCaseList *Blacklist;
+  const SpecialCaseList *Allowlist;
+  const SpecialCaseList *Blocklist;
 };
 
 class ModuleSanitizerCoverageLegacyPass : public ModulePass {
 public:
   ModuleSanitizerCoverageLegacyPass(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const std::vector  =
+  const std::vector  =
   std::vector(),
-  const std::vector  =
+  const std::vector  =
   std::vector())
   : ModulePass(ID), Options(Options) {
-if (WhitelistFiles.size() > 0)
-  Whitelist = SpecialCaseList::createOrDie(WhitelistFiles,
+if (AllowlistFiles.size() > 0)
+  Allowlist = SpecialCaseList::createOrDie(AllowlistFiles,
*vfs::getRealFileSystem());
-if (BlacklistFiles.size() > 0)
-  Blacklist = SpecialCaseList::createOrDie(BlacklistFiles,
+if (BlocklistFiles.size() > 0)
+  Blocklist = SpecialCaseList::createOrDie(BlocklistFiles,
*vfs::getRealFileSystem());
 initializeModuleSanitizerCoverageLegacyPassPass(
 *PassRegistry::getPassRegistry());
   }
   bool runOnModule(Module ) override {
-ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
- Blacklist.get());
+ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+ Blocklist.get());
 auto DTCallback = [this](Function ) -> const DominatorTree * {
   return >getAnalysis(F).getDomTree();
 };
@@ -314,16 +314,16 @@
 private:
   SanitizerCoverageOptions Options;
 
-  std::unique_ptr Whitelist;
-  std::unique_ptr Blacklist;
+  std::unique_ptr Allowlist;
+  std::unique_ptr Blocklist;
 };
 
 } // namespace
 
 PreservedAnalyses ModuleSanitizerCoveragePass::run(Module ,
ModuleAnalysisManager ) {
-  ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
-   Blacklist.get());
+  ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+   Blocklist.get());
   auto  = MAM.getResult(M).getManager();
   auto DTCallback = [](Function ) -> const DominatorTree * {
 return (F);
@@ -396,11 +396,11 @@
 Module , DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
   if (Options.CoverageType == SanitizerCoverageOptions::SCK_None)
 return false;
-  if (Whitelist &&
-  !Whitelist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Allowlist &&
+  !Allowlist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
-  if (Blacklist &&
-  Blacklist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Blocklist &&
+  Blocklist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
   C = &(M.getContext());
   DL = ();
@@ -639,9 +639,9 @@
   if (F.hasPersonalityFn() &&
   isAsynchronousEHPersonality(classifyEHPersonality(F.getPersonalityFn(
 return;
-  if 

[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments.



Comment at: clang/docs/ClangCommandLineReference.rst:313-316
+.. option:: -mharden-sls=
+
+Select straight-line speculation hardening scope
+

Miss merge?



Comment at: clang/docs/ClangCommandLineReference.rst:891
 
 Restrict sanitizer coverage instrumentation exclusively to modules and 
functions that match the provided special case list, except the blacklisted ones
 

I'd remove the uses of blacklist and whitelist here and below. Just have the 
language and the documentation be for the new option.



Comment at: clang/docs/SanitizerCoverage.rst:435
 Options
-  -blacklist= - Blacklist file (sanitizer blacklist 
format).
+  -blacklist= - Blocklist file (sanitizer blocklist 
format).
   -demangle   - Print demangled function name.

blacklist here.



Comment at: clang/include/clang/Driver/Options.td:1002
 HelpText<"Restrict sanitizer coverage instrumentation exclusively to 
modules and functions that match the provided special case list, except the 
blacklisted ones">;
-def fsanitize_coverage_blacklist : Joined<["-"], 
"fsanitize-coverage-blacklist=">,
+def : Joined<["-"], "fsanitize-coverage-whitelist=">,
+  Group, Flags<[CoreOption, HelpHidden]>, 
Alias;

Deprecate the option and comment it as such.



Comment at: 
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp:2
+// Tests -fsanitize-coverage-allowlist=whitelist.txt and
+// -fsanitize-coverage-blocklist=blacklist.txt with libFuzzer-like coverage
 // options

blacklist filename. probably want to change wl_* and bl_* below as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 272201.
MaskRay added a comment.

Fix documentation


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
  llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -200,10 +200,10 @@
 public:
   ModuleSanitizerCoverage(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const SpecialCaseList *Whitelist = nullptr,
-  const SpecialCaseList *Blacklist = nullptr)
-  : Options(OverrideFromCL(Options)), Whitelist(Whitelist),
-Blacklist(Blacklist) {}
+  const SpecialCaseList *Allowlist = nullptr,
+  const SpecialCaseList *Blocklist = nullptr)
+  : Options(OverrideFromCL(Options)), Allowlist(Allowlist),
+Blocklist(Blocklist) {}
   bool instrumentModule(Module , DomTreeCallback DTCallback,
 PostDomTreeCallback PDTCallback);
 
@@ -268,31 +268,31 @@
 
   SanitizerCoverageOptions Options;
 
-  const SpecialCaseList *Whitelist;
-  const SpecialCaseList *Blacklist;
+  const SpecialCaseList *Allowlist;
+  const SpecialCaseList *Blocklist;
 };
 
 class ModuleSanitizerCoverageLegacyPass : public ModulePass {
 public:
   ModuleSanitizerCoverageLegacyPass(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const std::vector  =
+  const std::vector  =
   std::vector(),
-  const std::vector  =
+  const std::vector  =
   std::vector())
   : ModulePass(ID), Options(Options) {
-if (WhitelistFiles.size() > 0)
-  Whitelist = SpecialCaseList::createOrDie(WhitelistFiles,
+if (AllowlistFiles.size() > 0)
+  Allowlist = SpecialCaseList::createOrDie(AllowlistFiles,
*vfs::getRealFileSystem());
-if (BlacklistFiles.size() > 0)
-  Blacklist = SpecialCaseList::createOrDie(BlacklistFiles,
+if (BlocklistFiles.size() > 0)
+  Blocklist = SpecialCaseList::createOrDie(BlocklistFiles,
*vfs::getRealFileSystem());
 initializeModuleSanitizerCoverageLegacyPassPass(
 *PassRegistry::getPassRegistry());
   }
   bool runOnModule(Module ) override {
-ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
- Blacklist.get());
+ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+ Blocklist.get());
 auto DTCallback = [this](Function ) -> const DominatorTree * {
   return >getAnalysis(F).getDomTree();
 };
@@ -314,16 +314,16 @@
 private:
   SanitizerCoverageOptions Options;
 
-  std::unique_ptr Whitelist;
-  std::unique_ptr Blacklist;
+  std::unique_ptr Allowlist;
+  std::unique_ptr Blocklist;
 };
 
 } // namespace
 
 PreservedAnalyses ModuleSanitizerCoveragePass::run(Module ,
ModuleAnalysisManager ) {
-  ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
-   Blacklist.get());
+  ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+   Blocklist.get());
   auto  = MAM.getResult(M).getManager();
   auto DTCallback = [](Function ) -> const DominatorTree * {
 return (F);
@@ -396,11 +396,11 @@
 Module , DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
   if (Options.CoverageType == SanitizerCoverageOptions::SCK_None)
 return false;
-  if (Whitelist &&
-  !Whitelist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Allowlist &&
+  !Allowlist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
-  if (Blacklist &&
-  Blacklist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Blocklist &&
+  Blocklist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
   C = &(M.getContext());
   DL = ();
@@ -639,9 +639,9 @@
   if (F.hasPersonalityFn() &&
   isAsynchronousEHPersonality(classifyEHPersonality(F.getPersonalityFn(
 return;
-  if (Whitelist && !Whitelist->inSection("coverage", "fun", F.getName()))
+  if (Allowlist && 

[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a reviewer: HAPPY.
echristo added a comment.

You'll want to grab blacklist/whitelist in the comments around as well.

We've been talking about having a need for deprecated aliases file for these 
options - it's probably worth bringing this patch up on cfe-dev and cc'ing 
richardsmith explicitly. I think we can avoid compatibility aliases, but would 
like Richard to sign off.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 272200.
MaskRay edited the summary of this revision.
MaskRay edited reviewers, added: pcc; removed: HAPPY.
MaskRay added a comment.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Add aliases


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_allowlist_blocklist.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
  llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -200,10 +200,10 @@
 public:
   ModuleSanitizerCoverage(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const SpecialCaseList *Whitelist = nullptr,
-  const SpecialCaseList *Blacklist = nullptr)
-  : Options(OverrideFromCL(Options)), Whitelist(Whitelist),
-Blacklist(Blacklist) {}
+  const SpecialCaseList *Allowlist = nullptr,
+  const SpecialCaseList *Blocklist = nullptr)
+  : Options(OverrideFromCL(Options)), Allowlist(Allowlist),
+Blocklist(Blocklist) {}
   bool instrumentModule(Module , DomTreeCallback DTCallback,
 PostDomTreeCallback PDTCallback);
 
@@ -268,31 +268,31 @@
 
   SanitizerCoverageOptions Options;
 
-  const SpecialCaseList *Whitelist;
-  const SpecialCaseList *Blacklist;
+  const SpecialCaseList *Allowlist;
+  const SpecialCaseList *Blocklist;
 };
 
 class ModuleSanitizerCoverageLegacyPass : public ModulePass {
 public:
   ModuleSanitizerCoverageLegacyPass(
   const SanitizerCoverageOptions  = SanitizerCoverageOptions(),
-  const std::vector  =
+  const std::vector  =
   std::vector(),
-  const std::vector  =
+  const std::vector  =
   std::vector())
   : ModulePass(ID), Options(Options) {
-if (WhitelistFiles.size() > 0)
-  Whitelist = SpecialCaseList::createOrDie(WhitelistFiles,
+if (AllowlistFiles.size() > 0)
+  Allowlist = SpecialCaseList::createOrDie(AllowlistFiles,
*vfs::getRealFileSystem());
-if (BlacklistFiles.size() > 0)
-  Blacklist = SpecialCaseList::createOrDie(BlacklistFiles,
+if (BlocklistFiles.size() > 0)
+  Blocklist = SpecialCaseList::createOrDie(BlocklistFiles,
*vfs::getRealFileSystem());
 initializeModuleSanitizerCoverageLegacyPassPass(
 *PassRegistry::getPassRegistry());
   }
   bool runOnModule(Module ) override {
-ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
- Blacklist.get());
+ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+ Blocklist.get());
 auto DTCallback = [this](Function ) -> const DominatorTree * {
   return >getAnalysis(F).getDomTree();
 };
@@ -314,16 +314,16 @@
 private:
   SanitizerCoverageOptions Options;
 
-  std::unique_ptr Whitelist;
-  std::unique_ptr Blacklist;
+  std::unique_ptr Allowlist;
+  std::unique_ptr Blocklist;
 };
 
 } // namespace
 
 PreservedAnalyses ModuleSanitizerCoveragePass::run(Module ,
ModuleAnalysisManager ) {
-  ModuleSanitizerCoverage ModuleSancov(Options, Whitelist.get(),
-   Blacklist.get());
+  ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
+   Blocklist.get());
   auto  = MAM.getResult(M).getManager();
   auto DTCallback = [](Function ) -> const DominatorTree * {
 return (F);
@@ -396,11 +396,11 @@
 Module , DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
   if (Options.CoverageType == SanitizerCoverageOptions::SCK_None)
 return false;
-  if (Whitelist &&
-  !Whitelist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Allowlist &&
+  !Allowlist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
-  if (Blacklist &&
-  Blacklist->inSection("coverage", "src", M.getSourceFileName()))
+  if (Blocklist &&
+  Blocklist->inSection("coverage", "src", M.getSourceFileName()))
 return false;
   C = &(M.getContext());
   DL = ();
@@ -639,9 +639,9 @@
   if (F.hasPersonalityFn() &&
   

[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 272193.
MaskRay added a comment.

Update more files


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82244/new/

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp

Index: compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
===
--- compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
+++ compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
@@ -1,5 +1,5 @@
-// Tests -fsanitize-coverage-whitelist=whitelist.txt and
-// -fsanitize-coverage-blacklist=blacklist.txt with libFuzzer-like coverage
+// Tests -fsanitize-coverage-allowlist=whitelist.txt and
+// -fsanitize-coverage-blocklist=blacklist.txt with libFuzzer-like coverage
 // options
 
 // REQUIRES: has_sancovcc,stable-runtime
@@ -38,53 +38,53 @@
 // RUN: echo 'section "__sancov_pcs"'   >> patterns.txt
 
 // RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table  2>&1 | grep -f patterns.txt | count 14
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_all.txt 2>&1 | grep -f patterns.txt | count 14
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_none.txt2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_file.txt2>&1 | grep -f patterns.txt | count 14
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_foo.txt 2>&1 | grep -f patterns.txt | count 9
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_bar.txt 2>&1 | grep -f patterns.txt | count 5
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_all.txt 2>&1 | grep -f patterns.txt | count 14
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_none.txt2>&1 | not grep -f patterns.txt
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_file.txt2>&1 | grep -f patterns.txt | count 14
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_foo.txt 2>&1 | grep -f patterns.txt | count 9
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_bar.txt 2>&1 | grep -f patterns.txt | count 5
 
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table   -fsanitize-coverage-blacklist=bl_all.txt   2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_all.txt  -fsanitize-coverage-blacklist=bl_all.txt   2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_none.txt -fsanitize-coverage-blacklist=bl_all.txt   2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table 

[PATCH] D82244: [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list

2020-06-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision.
MaskRay added reviewers: echristo, mehdi_amini, morehouse.
Herald added subscribers: Sanitizers, cfe-commits, aaron.ballman.
Herald added projects: clang, Sanitizers.
MaskRay updated this revision to Diff 272193.
MaskRay added a comment.

Update more files


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82244

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/SanitizerCoverage.rst
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/SanitizerArgs.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp

Index: compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
===
--- compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
+++ compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_whitelist_blacklist.cpp
@@ -1,5 +1,5 @@
-// Tests -fsanitize-coverage-whitelist=whitelist.txt and
-// -fsanitize-coverage-blacklist=blacklist.txt with libFuzzer-like coverage
+// Tests -fsanitize-coverage-allowlist=whitelist.txt and
+// -fsanitize-coverage-blocklist=blacklist.txt with libFuzzer-like coverage
 // options
 
 // REQUIRES: has_sancovcc,stable-runtime
@@ -38,53 +38,53 @@
 // RUN: echo 'section "__sancov_pcs"'   >> patterns.txt
 
 // RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table  2>&1 | grep -f patterns.txt | count 14
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_all.txt 2>&1 | grep -f patterns.txt | count 14
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_none.txt2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_file.txt2>&1 | grep -f patterns.txt | count 14
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_foo.txt 2>&1 | grep -f patterns.txt | count 9
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_bar.txt 2>&1 | grep -f patterns.txt | count 5
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_all.txt 2>&1 | grep -f patterns.txt | count 14
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_none.txt2>&1 | not grep -f patterns.txt
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_file.txt2>&1 | grep -f patterns.txt | count 14
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_foo.txt 2>&1 | grep -f patterns.txt | count 9
+// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-allowlist=wl_bar.txt 2>&1 | grep -f patterns.txt | count 5
 
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table   -fsanitize-coverage-blacklist=bl_all.txt   2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_all.txt  -fsanitize-coverage-blacklist=bl_all.txt   2>&1 | not grep -f patterns.txt
-// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=inline-8bit-counters,indirect-calls,trace-cmp,pc-table -fsanitize-coverage-whitelist=wl_none.txt -fsanitize-coverage-blacklist=bl_all.txt   2>&1 | not grep -f patterns.txt
-// RUN: