echristo created this revision.
echristo added a reviewer: mehdi_amini.
Herald added subscribers: aaron.ballman, atanasyan, jrtc27, kbarton, nemanjai, 
sdardis, mcrosier.
Herald added a project: LLDB.
echristo edited the summary of this revision.
Herald added a subscriber: wuzish.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82238

Files:
  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

Index: lldb/source/Utility/Args.cpp
===================================================================
--- lldb/source/Utility/Args.cpp
+++ lldb/source/Utility/Args.cpp
@@ -44,7 +44,7 @@
       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 @@
         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 += '\\';
Index: lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
===================================================================
--- lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
@@ -300,7 +300,7 @@
 
   /// 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
Index: lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
+++ lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
@@ -41,7 +41,7 @@
       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;
Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
===================================================================
--- lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
@@ -79,7 +79,7 @@
   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);
Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -43,7 +43,7 @@
 CPPLanguageRuntime::CPPLanguageRuntime(Process *process)
     : LanguageRuntime(process) {}
 
-bool CPPLanguageRuntime::IsWhitelistedRuntimeValue(ConstString name) {
+bool CPPLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
   return name == g_this;
 }
 
Index: lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
@@ -186,7 +186,7 @@
   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 {};
 
Index: lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
===================================================================
--- lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
+++ lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
@@ -48,7 +48,7 @@
   //
   // 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 different functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
Index: lldb/source/Plugins/ABI/X86/ABISysV_i386.h
===================================================================
--- lldb/source/Plugins/ABI/X86/ABISysV_i386.h
+++ lldb/source/Plugins/ABI/X86/ABISysV_i386.h
@@ -53,7 +53,7 @@
   //
   // 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 different functions
   // involved in async traps.
 
Index: lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
===================================================================
--- lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
+++ lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
@@ -45,7 +45,7 @@
   //
   // 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 different functions
   // involved in async traps.
   //
Index: lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
===================================================================
--- lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
+++ lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
@@ -49,7 +49,7 @@
   //
   // 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 different functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
Index: lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
===================================================================
--- lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
+++ lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
@@ -49,7 +49,7 @@
   //
   // 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 different functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
Index: lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
===================================================================
--- lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
+++ lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
@@ -51,7 +51,7 @@
   //
   // 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 different functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
Index: lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
===================================================================
--- lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
+++ lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
@@ -45,7 +45,7 @@
   //
   // 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 different functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
Index: lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
===================================================================
--- lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
+++ lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
@@ -42,7 +42,7 @@
   //
   // 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 different functions
   // involved in async traps.
   bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
Index: lldb/source/Core/ValueObject.cpp
===================================================================
--- lldb/source/Core/ValueObject.cpp
+++ lldb/source/Core/ValueObject.cpp
@@ -1723,7 +1723,7 @@
     return false;
 
   if (auto *runtime = process->GetLanguageRuntime(GetVariable()->GetLanguage()))
-    if (runtime->IsWhitelistedRuntimeValue(GetName()))
+    if (runtime->IsAllowedRuntimeValue(GetName()))
       return false;
 
   return true;
Index: lldb/include/lldb/Target/LanguageRuntime.h
===================================================================
--- lldb/include/lldb/Target/LanguageRuntime.h
+++ lldb/include/lldb/Target/LanguageRuntime.h
@@ -153,7 +153,7 @@
 
   /// 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;
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH] ... Eric Christopher via Phabricator via lldb-commits

Reply via email to