OSDN Git Service

[Support/Utils] As part of using inclusive language within the
authorEric Christopher <echristo@gmail.com>
Sat, 20 Jun 2020 07:15:50 +0000 (00:15 -0700)
committerEric Christopher <echristo@gmail.com>
Sat, 20 Jun 2020 07:15:50 +0000 (00:15 -0700)
llvm project, migrate away from the use of blacklist and whitelist.

llvm/include/llvm/Support/SpecialCaseList.h
llvm/utils/lint/cpp_lint.py

index 2d4930f..d022a8f 100644 (file)
@@ -7,8 +7,8 @@
 //
 // This is a utility class used to parse user-provided text files with
 // "special case lists" for code sanitizers. Such files are used to
-// define an "ABI list" for DataFlowSanitizer and blacklists for sanitizers
-// like AddressSanitizer or UndefinedBehaviorSanitizer.
+// define an "ABI list" for DataFlowSanitizer and allow/exclusion lists for
+// sanitizers like AddressSanitizer or UndefinedBehaviorSanitizer.
 //
 // Empty lines and lines starting with "#" are ignored. Sections are defined
 // using a '[section_name]' header and can be used to specify sanitizers the
 //   prefix:wildcard_expression[=category]
 // If category is not specified, it is assumed to be empty string.
 // Definitions of "prefix" and "category" are sanitizer-specific. For example,
-// sanitizer blacklists support prefixes "src", "fun" and "global".
+// sanitizer exclusion support prefixes "src", "fun" and "global".
 // Wildcard expressions define, respectively, source files, functions or
 // globals which shouldn't be instrumented.
 // Examples of categories:
 //   "functional": used in DFSan to list functions with pure functional
 //                 semantics.
-//   "init": used in ASan blacklist to disable initialization-order bugs
+//   "init": used in ASan exclusion list to disable initialization-order bugs
 //           detection for certain globals or source files.
 // Full special case list file example:
 // ---
 // [address]
-// # Blacklisted items:
+// # Excluded items:
 // fun:*_ZN4base6subtle*
 // global:*global_with_bad_access_or_initialization*
 // global:*global_with_initialization_issues*=init
@@ -98,7 +98,7 @@ public:
   ///   @Prefix:<E>=@Category
   /// \endcode
   /// where @Query satisfies wildcard expression <E> in a given @Section.
-  /// Returns zero if there is no blacklist entry corresponding to this
+  /// Returns zero if there is no exclusion entry corresponding to this
   /// expression.
   unsigned inSectionBlame(StringRef Section, StringRef Prefix, StringRef Query,
                           StringRef Category = StringRef()) const;
index 2fb8cc9..316ad98 100755 (executable)
@@ -53,7 +53,7 @@ def VerifyIncludes(filename, lines):
     if system_header:
       curr_system_header = system_header.group(1)
 
-      # Is it blacklisted?
+      # Is it disallowed?
       if curr_system_header in DISALLOWED_SYSTEM_HEADERS:
         lint.append((filename, line_num,
                      'Disallowed system header: <%s>' % curr_system_header))