[LLVM][llvm-cfi] Inclusive language: replace uses of blacklist with ignorelist
authorZarko Todorovski <zarko@ca.ibm.com>
Mon, 8 Nov 2021 14:44:26 +0000 (09:44 -0500)
committerZarko Todorovski <zarko@ca.ibm.com>
Mon, 8 Nov 2021 15:05:52 +0000 (10:05 -0500)
Replace the description and file names for this argument. As far as I understand
this is a positional argument and I don't believe this changes breaks any existing
interfaces.

Reviewed By: hctim, MaskRay

Differential Revision: https://reviews.llvm.org/D113316

llvm/test/tools/llvm-cfi-verify/X86/ignorelist-expected-unprotected.s [moved from llvm/test/tools/llvm-cfi-verify/X86/blacklist-expected-unprotected.s with 69% similarity]
llvm/test/tools/llvm-cfi-verify/X86/ignorelist-match-fun.s [moved from llvm/test/tools/llvm-cfi-verify/X86/blacklist-match-fun.s with 69% similarity]
llvm/test/tools/llvm-cfi-verify/X86/ignorelist-unexpected-protected.s [moved from llvm/test/tools/llvm-cfi-verify/X86/blacklist-unexpected-protected.s with 68% similarity]
llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp

@@ -1,11 +1,11 @@
 # RUN: llvm-mc %S/Inputs/unprotected-lineinfo.s -filetype obj \
 # RUN:         -triple x86_64-linux-elf -o %t.o
-# RUN: echo "src:*tiny*" > %t.blacklist.txt
-# RUN: llvm-cfi-verify %t.o %t.blacklist.txt | FileCheck %s
+# RUN: echo "src:*tiny*" > %t.ignorelist.txt
+# RUN: llvm-cfi-verify %t.o %t.ignorelist.txt | FileCheck %s
 
 # CHECK-LABEL: {{^Instruction: .* \(FAIL_BAD_CONDITIONAL_BRANCH\)}}
 # CHECK-NEXT: tiny.cc:11
-# CHECK-NEXT: {{^Blacklist Match:.*blacklist\.txt:1$}}
+# CHECK-NEXT: {{^Ignorelist Match:.*ignorelist\.txt:1$}}
 # CHECK-NEXT: ====> Expected Unprotected
 
 # CHECK: Expected Protected: 0 (0.00%)
@@ -13,5 +13,5 @@
 # CHECK: Expected Unprotected: 1 (100.00%)
 # CHECK: Unexpected Unprotected (BAD): 0 (0.00%)
 
-# Source: (blacklist.txt):
+# Source: (ignorelist.txt):
 #   src:*tiny*
@@ -1,11 +1,11 @@
 # RUN: llvm-mc %S/Inputs/unprotected-fullinfo.s -filetype obj \
 # RUN:         -triple x86_64-linux-elf -o %t.o
-# RUN: echo "fun:*main*" > %t.blacklist.txt
-# RUN: llvm-cfi-verify %t.o %t.blacklist.txt | FileCheck %s
+# RUN: echo "fun:*main*" > %t.ignorelist.txt
+# RUN: llvm-cfi-verify %t.o %t.ignorelist.txt | FileCheck %s
 
 # CHECK-LABEL: {{^Instruction: .* \(FAIL_BAD_CONDITIONAL_BRANCH\)}}
 # CHECK-NEXT: tiny.cc:11
-# CHECK-NEXT: {{^Blacklist Match:.*blacklist\.txt:1$}}
+# CHECK-NEXT: {{^Ignorelist Match:.*ignorelist\.txt:1$}}
 # CHECK-NEXT: ====> Expected Unprotected
 
 # CHECK: Expected Protected: 0 (0.00%)
@@ -13,5 +13,5 @@
 # CHECK: Expected Unprotected: 1 (100.00%)
 # CHECK: Unexpected Unprotected (BAD): 0 (0.00%)
 
-# Source: (blacklist.txt):
+# Source: (ignorelist.txt):
 #   fun:*main*
@@ -1,11 +1,11 @@
 # RUN: llvm-mc %S/Inputs/protected-lineinfo.s -filetype obj \
 # RUN:         -triple x86_64-linux-elf -o %t.o
-# RUN: echo "src:*tiny*" > %t.blacklist.txt
-# RUN: llvm-cfi-verify %t.o %t.blacklist.txt | FileCheck %s
+# RUN: echo "src:*tiny*" > %t.ignorelist.txt
+# RUN: llvm-cfi-verify %t.o %t.ignorelist.txt | FileCheck %s
 
 # CHECK-LABEL: {{^Instruction: .* \(PROTECTED\)}}
 # CHECK-NEXT: tiny.cc:11
-# CHECK-NEXT: {{^Blacklist Match:.*blacklist\.txt:1$}}
+# CHECK-NEXT: {{^Ignorelist Match:.*ignorelist\.txt:1$}}
 # CHECK-NEXT: ====> Unexpected Protected
 
 # CHECK: Expected Protected: 0 (0.00%)
@@ -13,5 +13,5 @@
 # CHECK: Expected Unprotected: 0 (0.00%)
 # CHECK: Unexpected Unprotected (BAD): 0 (0.00%)
 
-# Source: (blacklist.txt):
+# Source: (ignorelist.txt):
 #   src:*tiny*
index 3cb0e84..8c43ea8 100644 (file)
@@ -36,10 +36,10 @@ static cl::OptionCategory CFIVerifyCategory("CFI Verify Options");
 
 cl::opt<std::string> InputFilename(cl::Positional, cl::desc("<input file>"),
                                    cl::Required, cl::cat(CFIVerifyCategory));
-cl::opt<std::string> BlacklistFilename(cl::Positional,
-                                       cl::desc("[blacklist file]"),
-                                       cl::init("-"),
-                                       cl::cat(CFIVerifyCategory));
+cl::opt<std::string> IgnorelistFilename(cl::Positional,
+                                        cl::desc("[ignorelist file]"),
+                                        cl::init("-"),
+                                        cl::cat(CFIVerifyCategory));
 cl::opt<bool> PrintGraphs(
     "print-graphs",
     cl::desc("Print graphs around indirect CF instructions in DOT format."),
@@ -103,7 +103,7 @@ static void printInstructionInformation(const FileAnalysis &Analysis,
 static void printInstructionStatus(unsigned BlameLine, bool CFIProtected,
                                    const DILineInfo &LineInfo) {
   if (BlameLine) {
-    outs() << "Blacklist Match: " << BlacklistFilename << ":" << BlameLine
+    outs() << "Ignorelist Match: " << IgnorelistFilename << ":" << BlameLine
            << "\n";
     if (CFIProtected)
       outs() << "====> Unexpected Protected\n";
@@ -240,9 +240,9 @@ printIndirectCFInstructions(FileAnalysis &Analysis,
   if (!SpecialCaseList)
     return;
 
-  outs() << "\nBlacklist Results:\n";
+  outs() << "\nIgnorelist Results:\n";
   for (const auto &KV : BlameCounter) {
-    outs() << "  " << BlacklistFilename << ":" << KV.first << " affects "
+    outs() << "  " << IgnorelistFilename << ":" << KV.first << " affects "
            << KV.second << " indirect CF instructions.\n";
   }
 }
@@ -265,12 +265,12 @@ int main(int argc, char **argv) {
     PrintBlameContext.setValue(PrintBlameContextAll);
 
   std::unique_ptr<SpecialCaseList> SpecialCaseList;
-  if (BlacklistFilename != "-") {
+  if (IgnorelistFilename != "-") {
     std::string Error;
-    SpecialCaseList = SpecialCaseList::create({BlacklistFilename},
+    SpecialCaseList = SpecialCaseList::create({IgnorelistFilename},
                                               *vfs::getRealFileSystem(), Error);
     if (!SpecialCaseList) {
-      errs() << "Failed to get blacklist: " << Error << "\n";
+      errs() << "Failed to get ignorelist: " << Error << "\n";
       exit(EXIT_FAILURE);
     }
   }