Skip to content

Commit b34791a

Browse files
committed
Update code as per Apple Style Guide
whitelist -> allowlist blacklist -> denylist
1 parent 115244f commit b34791a

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

docs/Testing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,17 +572,17 @@ If you're specifically testing the autoreleasing behavior of code, or do not
572572
expect code to interact with the Objective-C runtime, it may be OK to use ``if
573573
true {}``, but those assumptions should be commented in the test.
574574
575-
#### Enabling/disabling the lldb test whitelist
575+
#### Enabling/disabling the lldb test allowlist
576576
577-
It's possible to enable a whitelist of swift-specific lldb tests to run during
577+
It's possible to enable a allowlist of swift-specific lldb tests to run during
578578
PR smoke testing. Note that the default set of tests which run (which includes
579-
tests not in the whitelist) already only includes swift-specific tests.
579+
tests not in the allowlist) already only includes swift-specific tests.
580580
581-
Enabling the whitelist is an option of last-resort to unblock swift PR testing
581+
Enabling the allowlist is an option of last-resort to unblock swift PR testing
582582
in the event that lldb test failures cannot be resolved in a timely way. If
583-
this becomes necessary, be sure to double-check that enabling the whitelist
583+
this becomes necessary, be sure to double-check that enabling the allowlist
584584
actually unblocks PR testing by running the smoke test build preset locally.
585585
586-
To enable the lldb test whitelist, add `-G swiftpr` to the
586+
To enable the lldb test allowlist, add `-G swiftpr` to the
587587
`LLDB_TEST_CATEGORIES` variable in `utils/build-script-impl`. Disable it by
588588
removing that option.

lib/IRGen/GenDecl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,9 +2111,9 @@ swift::irgen::createLinkerDirectiveVariable(IRGenModule &IGM, StringRef name) {
21112111
}
21122112

21132113
void swift::irgen::disableAddressSanitizer(IRGenModule &IGM, llvm::GlobalVariable *var) {
2114-
// Add an operand to llvm.asan.globals blacklisting this global variable.
2114+
// Add an operand to llvm.asan.globals denylisting this global variable.
21152115
llvm::Metadata *metadata[] = {
2116-
// The global variable to blacklist.
2116+
// The global variable to denylist.
21172117
llvm::ConstantAsMetadata::get(var),
21182118

21192119
// Source location. Optional, unnecessary here.
@@ -2126,7 +2126,7 @@ void swift::irgen::disableAddressSanitizer(IRGenModule &IGM, llvm::GlobalVariabl
21262126
llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(
21272127
llvm::Type::getInt1Ty(IGM.Module.getContext()), false)),
21282128

2129-
// Whether the global is blacklisted.
2129+
// Whether the global is denylisted.
21302130
llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(
21312131
llvm::Type::getInt1Ty(IGM.Module.getContext()), true))};
21322132

lib/SIL/Utils/MemAccessUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ bool swift::isSingleInitAllocStack(AllocStackInst *asi,
509509
continue;
510510
}
511511

512-
// Otherwise, if we have found something not in our whitelist, return false.
512+
// Otherwise, if we have found something not in our allowlist, return false.
513513
return false;
514514
}
515515

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,13 +1936,13 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
19361936
}
19371937

19381938
// Verify that all formal accesses patterns are recognized as part of a
1939-
// whitelist. The presence of an unknown pattern means that analysis will
1939+
// allowlist. The presence of an unknown pattern means that analysis will
19401940
// silently fail, and the compiler may be introducing undefined behavior
19411941
// with no other way to detect it.
19421942
//
19431943
// For example, AccessEnforcementWMO runs very late in the
19441944
// pipeline and assumes valid storage for all dynamic Read/Modify access. It
1945-
// also requires that Unidentified access fit a whitelist on known
1945+
// also requires that Unidentified access fit a allowlist on known
19461946
// non-internal globals or class properties.
19471947
//
19481948
// First check that identifyFormalAccess returns without asserting. For

lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ static void checkAccessedAddress(Operand *memOper, StorageMap &Accesses) {
10191019

10201020
const AccessedStorage &storage = findAccessedStorage(address);
10211021
// findAccessedStorage may return an invalid storage object if the address
1022-
// producer is not recognized by its whitelist. For the purpose of
1022+
// producer is not recognized by its allowlist. For the purpose of
10231023
// verification, we assume that this can only happen for local
10241024
// initialization, not a formal memory access. The strength of
10251025
// verification rests on the completeness of the opcode list inside

lib/SILOptimizer/Transforms/CopyForwarding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class AddressUserVisitor {
200200

201201
/// Gather all instructions that use the given `address`
202202
///
203-
/// "Normal" uses are a whitelisted set of uses that guarantees the address is
203+
/// "Normal" uses are a allowlisted set of uses that guarantees the address is
204204
/// only used as if it refers to a single value and all uses are accounted for
205205
/// (no address projections).
206206
///

lib/SILOptimizer/Transforms/TempRValueElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ bool TempRValueOptPass::checkTempObjectDestroy(
419419
return false;
420420

421421
// Look for a known destroy point as described in the function level
422-
// comment. This whitelist can be expanded as more cases are handled in
422+
// comment. This allowlist can be expanded as more cases are handled in
423423
// tryOptimizeCopyIntoTemp during copy replacement.
424424
SILInstruction *lastUser = &*std::prev(pos);
425425
if (isa<DestroyAddrInst>(lastUser))

test/IRGen/ELF-remove-autolink-section.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ print("Hi from Swift!")
1414

1515
// ELF: module asm ".section .swift1_autolink_entries,\220x80000000\22"
1616

17-
// Find the metadata entry for the blacklisting of the metadata symbol
17+
// Find the metadata entry for the denylisting of the metadata symbol
1818
// Ensure that it is in the ASAN metadata
1919

2020
// ELF-DAG: !llvm.asan.globals = !{

test/api-digester/compare-clang-dump.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %empty-directory(%t.module-cache)
44
// RUN: %api-digester -dump-sdk -module Foo -o %t.dump1.json -module-cache-path %t.module-cache %clang-importer-sdk-nosource -I %S/Inputs/Foo -avoid-location
55
// RUN: %api-digester -dump-sdk -module Foo -o %t.dump2.json -module-cache-path %t.module-cache %clang-importer-sdk-nosource -I %S/Inputs/Foo-new-version -avoid-location
6-
// RUN: %api-digester -diagnose-sdk -protocol-requirement-white-list %S/Inputs/Foo-prot-whitelist.txt -print-module --input-paths %t.dump1.json -input-paths %t.dump2.json -o %t.result
6+
// RUN: %api-digester -diagnose-sdk -protocol-requirement-white-list %S/Inputs/Foo-prot-allowlist.txt -print-module --input-paths %t.dump1.json -input-paths %t.dump2.json -o %t.result
77

88
// RUN: %clang -E -P -x c %S/Outputs/Foo-diff.txt -o - | sed '/^\s*$/d' > %t.expected
99
// RUN: %clang -E -P -x c %t.result -o - | sed '/^\s*$/d' > %t.result.tmp

0 commit comments

Comments
 (0)