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

llvm/docs/HowToAddABuilder.rst
llvm/docs/ORCv2.rst
llvm/docs/Proposals/GitHubMove.rst
llvm/docs/Statepoints.rst
llvm/examples/OrcV2Examples/OrcV2CBindingsReflectProcessSymbols/OrcV2CBindingsReflectProcessSymbols.c

index 6912d2c..a30073d 100644 (file)
@@ -91,7 +91,7 @@ Here are the steps you can follow to do so:
    Please make sure your builder name and its builddir are unique through the
    file.
 
-   It is possible to whitelist email addresses to unconditionally receive
+   It is possible to allow email addresses to unconditionally receive
    notifications on build failure; for this you'll need to add an
    ``InformativeMailNotifier`` to ``buildbot/osuosl/master/config/status.py``.
    This is particularly useful for the staging buildmaster which is silent
index f5a07e6..5257ba9 100644 (file)
@@ -729,7 +729,7 @@ For example, to load the whole interface of a runtime library:
     // at '/path/to/lib'.
     CompileLayer.add(JD, loadModule(...));
 
-Or, to expose a whitelisted set of symbols from the main process:
+Or, to expose a allowed set of symbols from the main process:
 
   .. code-block:: c++
 
@@ -738,20 +738,20 @@ Or, to expose a whitelisted set of symbols from the main process:
 
     auto &JD = ES.createJITDylib("main");
 
-    DenseSet<SymbolStringPtr> Whitelist({
+    DenseSet<SymbolStringPtr> AllowList({
         Mangle("puts"),
         Mangle("gets")
       });
 
     // Use GetForCurrentProcess with a predicate function that checks the
-    // whitelist.
+    // allowed list.
     JD.setGenerator(
       DynamicLibrarySearchGenerator::GetForCurrentProcess(
         DL.getGlobalPrefix(),
-        [&](const SymbolStringPtr &S) { return Whitelist.count(S); }));
+        [&](const SymbolStringPtr &S) { return AllowList.count(S); }));
 
     // IR added to JD can now link against any symbols exported by the process
-    // and contained in the whitelist.
+    // and contained in the list.
     CompileLayer.add(JD, loadModule(...));
 
 Future Features
index 858f88a..d11dbe2 100644 (file)
@@ -141,9 +141,9 @@ Unfortunately, GitHub does not support server side hooks to enforce such a
 policy.  We must rely on the community to avoid pushing merge commits.
 
 GitHub offers a feature called `Status Checks`: a branch protected by
-`status checks` requires commits to be whitelisted before the push can happen.
+`status checks` requires commits to be explicitly allowed before the push can happen.
 We could supply a pre-push hook on the client side that would run and check the
-history, before whitelisting the commit being pushed [statuschecks]_.
+history, before allowing the commit being pushed [statuschecks]_.
 However this solution would be somewhat fragile (how do you update a script
 installed on every developer machine?) and prevents SVN access to the
 repository.
index 034cbff..f55445a 100644 (file)
@@ -772,7 +772,7 @@ relocation sequence, including all required ``gc.relocates``.
 
 Note that by default, this pass only runs for the "statepoint-example" or 
 "core-clr" gc strategies.  You will need to add your custom strategy to this 
-whitelist or use one of the predefined ones. 
+list or use one of the predefined ones. 
 
 As an example, given this code:
 
index a9c6510..790f153 100644 (file)
@@ -27,14 +27,14 @@ int32_t add(int32_t X, int32_t Y) { return X + Y; }
 
 int32_t mul(int32_t X, int32_t Y) { return X * Y; }
 
-int whitelistedSymbols(LLVMOrcSymbolStringPoolEntryRef Sym, void *Ctx) {
-  assert(Ctx && "Cannot call whitelistedSymbols with a null context");
+int allowedSymbols(LLVMOrcSymbolStringPoolEntryRef Sym, void *Ctx) {
+  assert(Ctx && "Cannot call allowedSymbols with a null context");
 
-  LLVMOrcSymbolStringPoolEntryRef *Whitelist =
+  LLVMOrcSymbolStringPoolEntryRef *AllowList =
       (LLVMOrcSymbolStringPoolEntryRef *)Ctx;
 
-  // If Sym appears in the whitelist then return true.
-  LLVMOrcSymbolStringPoolEntryRef *P = Whitelist;
+  // If Sym appears in the allowed list then return true.
+  LLVMOrcSymbolStringPoolEntryRef *P = AllowList;
   while (*P) {
     if (Sym == *P)
       return 1;
@@ -134,11 +134,11 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  // Build a filter to allow JIT'd code to only access whitelisted symbols.
+  // Build a filter to allow JIT'd code to only access allowed symbols.
   // This filter is optional: If a null value is suppled for the Filter
   // argument to LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess then
   // all process symbols will be reflected.
-  LLVMOrcSymbolStringPoolEntryRef Whitelist[] = {
+  LLVMOrcSymbolStringPoolEntryRef AllowList[] = {
       LLVMOrcLLJITMangleAndIntern(J, "mul"),
       LLVMOrcLLJITMangleAndIntern(J, "add"), 0};
 
@@ -147,7 +147,7 @@ int main(int argc, char *argv[]) {
     LLVMErrorRef Err;
     if ((Err = LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(
              &ProcessSymbolsGenerator, LLVMOrcLLJITGetGlobalPrefix(J),
-             whitelistedSymbols, Whitelist))) {
+             allowedSymbols, AllowList))) {
       MainResult = handleError(Err);
       goto jit_cleanup;
     }
@@ -192,9 +192,9 @@ int main(int argc, char *argv[]) {
 
 jit_cleanup:
   // Release all symbol string pool entries that we have allocated. In this
-  // example that's just our whitelist entries.
+  // example that's just our allowed entries.
   {
-    LLVMOrcSymbolStringPoolEntryRef *P = Whitelist;
+    LLVMOrcSymbolStringPoolEntryRef *P = AllowList;
     while (*P)
       LLVMOrcReleaseSymbolStringPoolEntry(*P++);
   }