[LLVM][llvm-cfi] Inclusive language: replace uses of blacklist with ignorelist

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
This commit is contained in:
Zarko Todorovski 2021-11-08 09:44:26 -05:00
parent 2c37ae6d14
commit c4396b77ae
4 changed files with 22 additions and 22 deletions

View File

@ -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*

View File

@ -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*

View File

@ -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*

View 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);
}
}