As part of using inclusive language with the llvm project,
migrate away from the use of blacklist and whitelist.
This commit is contained in:
parent
cdbd299800
commit
efb328f674
|
@ -153,7 +153,7 @@ public:
|
|||
|
||||
/// 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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
//
|
||||
// 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 {
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
//
|
||||
// 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 {
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
//
|
||||
// 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 {
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
//
|
||||
// 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 {
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
//
|
||||
// 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 {
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
//
|
||||
// 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.
|
||||
//
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
//
|
||||
// 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.
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
//
|
||||
// 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 {
|
||||
|
|
|
@ -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 {};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -300,7 +300,7 @@ public:
|
|||
|
||||
/// 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
|
||||
|
|
|
@ -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 += '\\';
|
||||
|
|
Loading…
Reference in New Issue