[Lldb-commits] [lldb] efb328f - As part of using inclusive language with the llvm project,

Eric Christopher via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 19 14:48:58 PDT 2020


Author: Eric Christopher
Date: 2020-06-19T14:48:48-07:00
New Revision: efb328f674ca67081818bbac45dda3f3452fc44b

URL: https://github.com/llvm/llvm-project/commit/efb328f674ca67081818bbac45dda3f3452fc44b
DIFF: https://github.com/llvm/llvm-project/commit/efb328f674ca67081818bbac45dda3f3452fc44b.diff

LOG: As part of using inclusive language with the llvm project,
migrate away from the use of blacklist and whitelist.

Added: 
    

Modified: 
    lldb/include/lldb/Target/LanguageRuntime.h
    lldb/source/Core/ValueObject.cpp
    lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
    lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
    lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
    lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
    lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
    lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
    lldb/source/Plugins/ABI/X86/ABISysV_i386.h
    lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
    lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
    lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
    lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
    lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
    lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
    lldb/source/Utility/Args.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index 3ee60a5f876f..b0b9b919911a 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -153,7 +153,7 @@ class LanguageRuntime : public PluginInterface {
 
   /// Identify whether a name is a runtime value that should not be hidden by
   /// from the user interface.
-  virtual bool IsWhitelistedRuntimeValue(ConstString name) { return false; }
+  virtual bool IsAllowedRuntimeValue(ConstString name) { return false; }
 
   virtual llvm::Optional<CompilerType> GetRuntimeType(CompilerType base_type) {
     return llvm::None;

diff  --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 3a6ca522f308..ba3d2c509be8 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1723,7 +1723,7 @@ bool ValueObject::IsRuntimeSupportValue() {
     return false;
 
   if (auto *runtime = process->GetLanguageRuntime(GetVariable()->GetLanguage()))
-    if (runtime->IsWhitelistedRuntimeValue(GetName()))
+    if (runtime->IsAllowedRuntimeValue(GetName()))
       return false;
 
   return true;

diff  --git a/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h b/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
index b056df27ea5d..fc8ccee92e71 100644
--- a/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
+++ b/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
@@ -42,7 +42,7 @@ class ABIMacOSX_arm64 : public ABIAArch64 {
   //
   // To work around this, we relax that alignment to be just word-size
   // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {

diff  --git a/lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h b/lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
index f2a73be03292..aeb74acc38b5 100644
--- a/lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
+++ b/lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
@@ -45,7 +45,7 @@ class ABISysV_arm64 : public ABIAArch64 {
   //
   // To work around this, we relax that alignment to be just word-size
   // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {

diff  --git a/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h b/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
index 76253f21ee07..91428216a73a 100644
--- a/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
+++ b/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
@@ -51,7 +51,7 @@ class ABISysV_mips64 : public lldb_private::RegInfoBasedABI {
   //
   // To work around this, we relax that alignment to be just word-size
   // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {

diff  --git a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
index dbf29292b10e..4a586849e585 100644
--- a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
+++ b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
@@ -49,7 +49,7 @@ class ABISysV_ppc : public lldb_private::RegInfoBasedABI {
   //
   // To work around this, we relax that alignment to be just word-size
   // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {

diff  --git a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
index a5a6855834d2..8dcf3ca48b56 100644
--- a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
+++ b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
@@ -49,7 +49,7 @@ class ABISysV_ppc64 : public lldb_private::RegInfoBasedABI {
   //
   // To work around this, we relax that alignment to be just word-size
   // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {

diff  --git a/lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h b/lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
index 9b263b3a7931..b8b253144165 100644
--- a/lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
+++ b/lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
@@ -45,7 +45,7 @@ class ABIMacOSX_i386 : public ABIX86 {
   //
   // To work around this, we relax that alignment to be just word-size
   // (4-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   //

diff  --git a/lldb/source/Plugins/ABI/X86/ABISysV_i386.h b/lldb/source/Plugins/ABI/X86/ABISysV_i386.h
index f67aa0b73a55..1ebb107d36df 100644
--- a/lldb/source/Plugins/ABI/X86/ABISysV_i386.h
+++ b/lldb/source/Plugins/ABI/X86/ABISysV_i386.h
@@ -53,7 +53,7 @@ class ABISysV_i386 : public ABIX86 {
   //
   // To work around this, we relax that alignment to be just word-size
   // (4-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
 

diff  --git a/lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h b/lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
index 5968c0c8b8ec..6dce4ce0f012 100644
--- a/lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
+++ b/lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
@@ -48,7 +48,7 @@ class ABISysV_x86_64 : public ABIX86_64 {
   //
   // To work around this, we relax that alignment to be just word-size
   // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+  // Allowing the trap handlers for user space would be easy (_sigtramp) but
   // in other environments there can be a large number of 
diff erent functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {

diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
index ae2f074319bd..8fdce858a57c 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
@@ -186,7 +186,7 @@ llvm::Optional<Decl *> CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) {
   if (!td->getDeclContext()->isStdNamespace())
     return {};
 
-  // We have a whitelist of supported template names.
+  // We have a list of supported template names.
   if (m_supported_templates.find(td->getName()) == m_supported_templates.end())
     return {};
 

diff  --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
index 55b3b6f30173..8aa803a8553e 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -43,7 +43,7 @@ CPPLanguageRuntime::~CPPLanguageRuntime() {}
 CPPLanguageRuntime::CPPLanguageRuntime(Process *process)
     : LanguageRuntime(process) {}
 
-bool CPPLanguageRuntime::IsWhitelistedRuntimeValue(ConstString name) {
+bool CPPLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
   return name == g_this;
 }
 

diff  --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
index ec27df6997f2..5b00590e6301 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
@@ -79,7 +79,7 @@ class CPPLanguageRuntime : public LanguageRuntime {
   lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,
                                                   bool stop_others) override;
 
-  bool IsWhitelistedRuntimeValue(ConstString name) override;
+  bool IsAllowedRuntimeValue(ConstString name) override;
 protected:
   // Classes that inherit from CPPLanguageRuntime can see and modify these
   CPPLanguageRuntime(Process *process);

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
index 5fb03a67fcf9..2ccf9b33f9d8 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
@@ -41,7 +41,7 @@ ObjCLanguageRuntime::ObjCLanguageRuntime(Process *process)
       m_isa_to_descriptor_stop_id(UINT32_MAX), m_complete_class_cache(),
       m_negative_complete_class_cache() {}
 
-bool ObjCLanguageRuntime::IsWhitelistedRuntimeValue(ConstString name) {
+bool ObjCLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
   static ConstString g_self = ConstString("self");
   static ConstString g_cmd = ConstString("_cmd");
   return name == g_self || name == g_cmd;

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
index 17ff2f5929e0..c43acf54bbcd 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
@@ -300,7 +300,7 @@ class ObjCLanguageRuntime : public LanguageRuntime {
 
   /// Check whether the name is "self" or "_cmd" and should show up in
   /// "frame variable".
-  bool IsWhitelistedRuntimeValue(ConstString name) override;
+  bool IsAllowedRuntimeValue(ConstString name) override;
 
 protected:
   // Classes that inherit from ObjCLanguageRuntime can see and modify these

diff  --git a/lldb/source/Utility/Args.cpp b/lldb/source/Utility/Args.cpp
index 27e1811bf5b0..f718c6f9ff1c 100644
--- a/lldb/source/Utility/Args.cpp
+++ b/lldb/source/Utility/Args.cpp
@@ -44,7 +44,7 @@ static llvm::StringRef ParseDoubleQuotes(llvm::StringRef quoted,
       break;
     }
 
-    // If the character after the backslash is not a whitelisted escapable
+    // If the character after the backslash is not an allowed escapable
     // character, we leave the character sequence untouched.
     if (strchr(k_escapable_characters, quoted.front()) == nullptr)
       result += '\\';
@@ -111,7 +111,7 @@ ParseSingleArgument(llvm::StringRef command) {
         break;
       }
 
-      // If the character after the backslash is not a whitelisted escapable
+      // If the character after the backslash is not an allowed escapable
       // character, we leave the character sequence untouched.
       if (strchr(" \t\\'\"`", command.front()) == nullptr)
         arg += '\\';


        


More information about the lldb-commits mailing list