Index: lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp =================================================================== --- lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp +++ lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp @@ -79,7 +79,7 @@ switch (callable_info.callable_case) { case CPPLanguageRuntime::LibCppStdFunctionCallableCase::Invalid: - stream.Printf(" __f_ = %" PRIu64, callable_info.member__f_pointer_value); + stream.Printf(" __f_ = %" PRIu64, callable_info.member_double_underscore_f_pointer_value); return false; break; case CPPLanguageRuntime::LibCppStdFunctionCallableCase::Lambda: @@ -228,7 +228,7 @@ if (!valobj_sp) return false; - static ConstString g___i_("__i_"); + static ConstString g_double_underscore_i_("__i_"); // this must be a ValueObject* because it is a child of the ValueObject we // are producing children for it if were a ValueObjectSP, we would end up @@ -258,7 +258,7 @@ nullptr) .get(); if (m_pair_ptr) { - auto __i_(valobj_sp->GetChildMemberWithName(g___i_, true)); + auto __i_(valobj_sp->GetChildMemberWithName(g_double_underscore_i_, true)); if (!__i_) { m_pair_ptr = nullptr; return false; Index: lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp =================================================================== --- lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp +++ lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp @@ -61,9 +61,9 @@ size_t lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd:: CalculateNumChildren() { - static ConstString g___size_("__size_"); + static ConstString g_double_underscore_size_("__size_"); m_num_elements = 0; - ValueObjectSP size_sp(m_backend.GetChildMemberWithName(g___size_, true)); + ValueObjectSP size_sp(m_backend.GetChildMemberWithName(g_double_underscore_size_, true)); if (size_sp) m_num_elements = size_sp->GetValueAsUnsigned(0); return m_num_elements; @@ -85,7 +85,7 @@ bool lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd:: Update() { - static ConstString g___begin_("__begin_"); + static ConstString g_double_underscore_begin_("__begin_"); m_start = nullptr; m_num_elements = 0; @@ -96,7 +96,7 @@ if (llvm::Optional size = m_element_type.GetByteSize(nullptr)) { m_element_size = *size; // Store raw pointers or end up with a circular dependency. - m_start = m_backend.GetChildMemberWithName(g___begin_, true).get(); + m_start = m_backend.GetChildMemberWithName(g_double_underscore_begin_, true).get(); } return false; Index: lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp =================================================================== --- lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp +++ lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp @@ -213,27 +213,27 @@ size_t lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: CalculateNumChildren() { - static ConstString g___pair3_("__pair3_"); - static ConstString g___first_("__first_"); - static ConstString g___value_("__value_"); + static ConstString g_double_underscore_pair3_("__pair3_"); + static ConstString g_double_underscore_first_("__first_"); + static ConstString g_double_underscore_value_("__value_"); if (m_count != UINT32_MAX) return m_count; if (m_tree == nullptr) return 0; - ValueObjectSP m_item(m_tree->GetChildMemberWithName(g___pair3_, true)); + ValueObjectSP m_item(m_tree->GetChildMemberWithName(g_double_underscore_pair3_, true)); if (!m_item) return 0; switch (m_item->GetCompilerType().GetNumDirectBaseClasses()) { case 1: // Assume a pre llvm r300140 __compressed_pair implementation: - m_item = m_item->GetChildMemberWithName(g___first_, true); + m_item = m_item->GetChildMemberWithName(g_double_underscore_first_, true); break; case 2: { // Assume a post llvm r300140 __compressed_pair implementation: ValueObjectSP first_elem_parent = m_item->GetChildAtIndex(0, true); - m_item = first_elem_parent->GetChildMemberWithName(g___value_, true); + m_item = first_elem_parent->GetChildMemberWithName(g_double_underscore_value_, true); break; } default: @@ -247,7 +247,7 @@ } bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetDataType() { - static ConstString g___value_("__value_"); + static ConstString g_double_underscore_value_("__value_"); static ConstString g_tree_("__tree_"); static ConstString g_pair3("__pair3_"); @@ -259,7 +259,7 @@ deref = m_root_node->Dereference(error); if (!deref || error.Fail()) return false; - deref = deref->GetChildMemberWithName(g___value_, true); + deref = deref->GetChildMemberWithName(g_double_underscore_value_, true); if (deref) { m_element_type = deref->GetCompilerType(); return true; @@ -330,9 +330,9 @@ lldb::ValueObjectSP lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetChildAtIndex( size_t idx) { - static ConstString g___cc("__cc"); - static ConstString g___nc("__nc"); - static ConstString g___value_("__value_"); + static ConstString g_double_underscore_cc("__cc"); + static ConstString g_double_underscore_nc("__nc"); + static ConstString g_double_underscore_value_("__value_"); if (idx >= CalculateNumChildren()) return lldb::ValueObjectSP(); @@ -367,7 +367,7 @@ return lldb::ValueObjectSP(); } GetValueOffset(iterated_sp); - auto child_sp = iterated_sp->GetChildMemberWithName(g___value_, true); + auto child_sp = iterated_sp->GetChildMemberWithName(g_double_underscore_value_, true); if (child_sp) iterated_sp = child_sp; else @@ -416,15 +416,15 @@ switch (potential_child_sp->GetNumChildren()) { case 1: { auto child0_sp = potential_child_sp->GetChildAtIndex(0, true); - if (child0_sp && child0_sp->GetName() == g___cc) + if (child0_sp && child0_sp->GetName() == g_double_underscore_cc) potential_child_sp = child0_sp->Clone(ConstString(name.GetString())); break; } case 2: { auto child0_sp = potential_child_sp->GetChildAtIndex(0, true); auto child1_sp = potential_child_sp->GetChildAtIndex(1, true); - if (child0_sp && child0_sp->GetName() == g___cc && child1_sp && - child1_sp->GetName() == g___nc) + if (child0_sp && child0_sp->GetName() == g_double_underscore_cc && child1_sp && + child1_sp->GetName() == g_double_underscore_nc) potential_child_sp = child0_sp->Clone(ConstString(name.GetString())); break; } @@ -435,15 +435,15 @@ } bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::Update() { - static ConstString g___tree_("__tree_"); - static ConstString g___begin_node_("__begin_node_"); + static ConstString g_double_underscore_tree_("__tree_"); + static ConstString g_double_underscore_begin_node_("__begin_node_"); m_count = UINT32_MAX; m_tree = m_root_node = nullptr; m_iterators.clear(); - m_tree = m_backend.GetChildMemberWithName(g___tree_, true).get(); + m_tree = m_backend.GetChildMemberWithName(g_double_underscore_tree_, true).get(); if (!m_tree) return false; - m_root_node = m_tree->GetChildMemberWithName(g___begin_node_, true).get(); + m_root_node = m_tree->GetChildMemberWithName(g_double_underscore_begin_node_, true).get(); return false; } Index: lldb/source/Plugins/Language/ObjC/CF.cpp =================================================================== --- lldb/source/Plugins/Language/ObjC/CF.cpp +++ lldb/source/Plugins/Language/ObjC/CF.cpp @@ -74,10 +74,10 @@ if (descriptor->IsCFType()) { ConstString type_name(valobj.GetTypeName()); - static ConstString g___CFBag("__CFBag"); + static ConstString g_double_underscore_CFBag("__CFBag"); static ConstString g_conststruct__CFBag("const struct __CFBag"); - if (type_name == g___CFBag || type_name == g_conststruct__CFBag) { + if (type_name == g_double_underscore_CFBag || type_name == g_conststruct__CFBag) { if (valobj.IsPointerType()) is_type_ok = true; } @@ -257,12 +257,12 @@ if (descriptor->IsCFType()) { ConstString type_name(valobj.GetTypeName()); - static ConstString g___CFBinaryHeap("__CFBinaryHeap"); + static ConstString g_double_underscore_CFBinaryHeap("__CFBinaryHeap"); static ConstString g_conststruct__CFBinaryHeap( "const struct __CFBinaryHeap"); static ConstString g_CFBinaryHeapRef("CFBinaryHeapRef"); - if (type_name == g___CFBinaryHeap || + if (type_name == g_double_underscore_CFBinaryHeap || type_name == g_conststruct__CFBinaryHeap || type_name == g_CFBinaryHeapRef) { if (valobj.IsPointerType()) Index: lldb/source/Plugins/Language/ObjC/Cocoa.cpp =================================================================== --- lldb/source/Plugins/Language/ObjC/Cocoa.cpp +++ lldb/source/Plugins/Language/ObjC/Cocoa.cpp @@ -919,8 +919,8 @@ ConstString class_name = descriptor->GetClassName(); static const ConstString g_NSDate("NSDate"); - static const ConstString g___NSDate("__NSDate"); - static const ConstString g___NSTaggedDate("__NSTaggedDate"); + static const ConstString g_double_underscore_NSDate("__NSDate"); + static const ConstString g_double_underscore_NSTaggedDate("__NSTaggedDate"); static const ConstString g_NSCalendarDate("NSCalendarDate"); static const ConstString g_NSConstantDate("NSConstantDate"); @@ -928,8 +928,8 @@ return false; uint64_t info_bits = 0, value_bits = 0; - if ((class_name == g_NSDate) || (class_name == g___NSDate) || - (class_name == g___NSTaggedDate) || (class_name == g_NSConstantDate)) { + if ((class_name == g_NSDate) || (class_name == g_double_underscore_NSDate) || + (class_name == g_double_underscore_NSTaggedDate) || (class_name == g_NSConstantDate)) { if (descriptor->GetTaggedPointerInfo(&info_bits, &value_bits)) { date_value_bits = ((value_bits << 8) | (info_bits << 4)); memcpy(&date_value, &date_value_bits, sizeof(date_value_bits)); @@ -967,7 +967,7 @@ } // Accomodate for the __NSTaggedDate format introduced in Foundation 1600. - if (class_name == g___NSTaggedDate) { + if (class_name == g_double_underscore_NSTaggedDate) { auto *runtime = llvm::dyn_cast_or_null( ObjCLanguageRuntime::Get(*process_sp)); if (runtime && runtime->GetFoundationVersion() >= 1600) Index: lldb/source/Plugins/Language/ObjC/NSDictionary.cpp =================================================================== --- lldb/source/Plugins/Language/ObjC/NSDictionary.cpp +++ lldb/source/Plugins/Language/ObjC/NSDictionary.cpp @@ -70,16 +70,16 @@ ScratchTypeSystemClang::GetForTarget(*target_sp); if (target_ast_context) { - ConstString g___lldb_autogen_nspair("__lldb_autogen_nspair"); + ConstString g_double_underscore_lldb_autogen_nspair("__lldb_autogen_nspair"); compiler_type = target_ast_context->GetTypeForIdentifier( - g___lldb_autogen_nspair); + g_double_underscore_lldb_autogen_nspair); if (!compiler_type) { compiler_type = target_ast_context->CreateRecordType( nullptr, OptionalClangModuleID(), lldb::eAccessPublic, - g___lldb_autogen_nspair.GetCString(), clang::TTK_Struct, + g_double_underscore_lldb_autogen_nspair.GetCString(), clang::TTK_Struct, lldb::eLanguageTypeC); if (compiler_type) { Index: lldb/source/Plugins/Language/ObjC/NSError.cpp =================================================================== --- lldb/source/Plugins/Language/ObjC/NSError.cpp +++ lldb/source/Plugins/Language/ObjC/NSError.cpp @@ -164,8 +164,8 @@ bool MightHaveChildren() override { return true; } size_t GetIndexOfChildWithName(ConstString name) override { - static ConstString g___userInfo("_userInfo"); - if (name == g___userInfo) + static ConstString g_double_underscore_userInfo("_userInfo"); + if (name == g_double_underscore_userInfo) return 0; return UINT32_MAX; } Index: lldb/source/Plugins/Language/ObjC/NSException.cpp =================================================================== --- lldb/source/Plugins/Language/ObjC/NSException.cpp +++ lldb/source/Plugins/Language/ObjC/NSException.cpp @@ -156,14 +156,14 @@ // NSString *reason; // NSDictionary *userInfo; // id reserved; - static ConstString g___name("name"); - static ConstString g___reason("reason"); - static ConstString g___userInfo("userInfo"); - static ConstString g___reserved("reserved"); - if (name == g___name) return 0; - if (name == g___reason) return 1; - if (name == g___userInfo) return 2; - if (name == g___reserved) return 3; + static ConstString g_name("name"); + static ConstString g_reason("reason"); + static ConstString g_userInfo("userInfo"); + static ConstString g_reserved("reserved"); + if (name == g_name) return 0; + if (name == g_reason) return 1; + if (name == g_userInfo) return 2; + if (name == g_reserved) return 3; return UINT32_MAX; } Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h =================================================================== --- lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h +++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h @@ -32,7 +32,7 @@ Symbol callable_symbol; Address callable_address; LineEntry callable_line_entry; - lldb::addr_t member__f_pointer_value = 0u; + lldb::addr_t member_double_underscore_f_pointer_value = 0u; LibCppStdFunctionCallableCase callable_case = LibCppStdFunctionCallableCase::Invalid; }; Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp =================================================================== --- lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp +++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp @@ -63,7 +63,7 @@ CPPLanguageRuntime::LibCppStdFunctionCallableInfo line_entry_helper(Target &target, const SymbolContext &sc, Symbol *symbol, llvm::StringRef first_template_param_sref, - bool has___invoke) { + bool has_double_underscore_invoke) { CPPLanguageRuntime::LibCppStdFunctionCallableInfo optional_info; @@ -78,7 +78,7 @@ LineEntry line_entry; addr.CalculateSymbolContextLineEntry(line_entry); - if (contains_lambda_identifier(first_template_param_sref) || has___invoke) { + if (contains_lambda_identifier(first_template_param_sref) || has_double_underscore_invoke) { // Case 1 and 2 optional_info.callable_case = lldb_private::CPPLanguageRuntime:: LibCppStdFunctionCallableCase::Lambda; @@ -138,25 +138,25 @@ // we will obtain the name from this pointer. // 5) a free function. A pointer to the function will stored after the vtable // we will obtain the name from this pointer. - ValueObjectSP member__f_( + ValueObjectSP member_double_underscore_f_( valobj_sp->GetChildMemberWithName(ConstString("__f_"), true)); - if (member__f_) { - ValueObjectSP sub_member__f_( - member__f_->GetChildMemberWithName(ConstString("__f_"), true)); + if (member_double_underscore_f_) { + ValueObjectSP sub_member_double_underscore_f_( + member_double_underscore_f_->GetChildMemberWithName(ConstString("__f_"), true)); - if (sub_member__f_) - member__f_ = sub_member__f_; + if (sub_member_double_underscore_f_) + member_double_underscore_f_ = sub_member_double_underscore_f_; } - if (!member__f_) + if (!member_double_underscore_f_) return optional_info; - lldb::addr_t member__f_pointer_value = member__f_->GetValueAsUnsigned(0); + lldb::addr_t member_double_underscore_f_pointer_value = member_double_underscore_f_->GetValueAsUnsigned(0); - optional_info.member__f_pointer_value = member__f_pointer_value; + optional_info.member_double_underscore_f_pointer_value = member_double_underscore_f_pointer_value; - if (!member__f_pointer_value) + if (!member_double_underscore_f_pointer_value) return optional_info; ExecutionContext exe_ctx(valobj_sp->GetExecutionContextRef()); @@ -171,7 +171,7 @@ // First item pointed to by __f_ should be the pointer to the vtable for // a __base object. lldb::addr_t vtable_address = - process->ReadPointerFromMemory(member__f_pointer_value, status); + process->ReadPointerFromMemory(member_double_underscore_f_pointer_value, status); if (status.Fail()) return optional_info; @@ -182,7 +182,7 @@ if (status.Fail()) return optional_info; - lldb::addr_t address_after_vtable = member__f_pointer_value + address_size; + lldb::addr_t address_after_vtable = member_double_underscore_f_pointer_value + address_size; // As commented above we may not have a function pointer but if we do we will // need it. lldb::addr_t possible_function_address = @@ -257,7 +257,7 @@ } // These conditions are used several times to simplify statements later on. - bool has___invoke = + bool has_double_underscore_invoke = (symbol ? symbol->GetName().GetStringRef().contains("__invoke") : false); auto calculate_symbol_context_helper = [](auto &t, SymbolContextList &sc_list) { @@ -267,17 +267,17 @@ }; // Case 2 - if (has___invoke) { + if (has_double_underscore_invoke) { SymbolContextList scl; calculate_symbol_context_helper(symbol, scl); return line_entry_helper(target, scl[0], symbol, first_template_parameter, - has___invoke); + has_double_underscore_invoke); } // Case 4 or 5 if (symbol && !symbol->GetName().GetStringRef().startswith("vtable for") && - !contains_lambda_identifier(first_template_parameter) && !has___invoke) { + !contains_lambda_identifier(first_template_parameter) && !has_double_underscore_invoke) { optional_info.callable_case = LibCppStdFunctionCallableCase::FreeOrMemberFunction; optional_info.callable_address = function_address_resolved; @@ -307,7 +307,7 @@ if (!contains_lambda_identifier(name_to_use)) return optional_info; - if (vtable_cu && !has___invoke) { + if (vtable_cu && !has_double_underscore_invoke) { lldb::FunctionSP func_sp = vtable_cu->FindFunction([name_to_use](const FunctionSP &f) { auto name = f->GetName().GetStringRef(); @@ -328,7 +328,7 @@ // Case 1 or 3 if (scl.GetSize() >= 1) { optional_info = line_entry_helper(target, scl[0], symbol, - first_template_parameter, has___invoke); + first_template_parameter, has_double_underscore_invoke); } CallableLookupCache[func_to_match] = optional_info; Index: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp =================================================================== --- lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -3011,8 +3011,8 @@ if (m_CFBoolean_values) return true; - static ConstString g___kCFBooleanFalse("__kCFBooleanFalse"); - static ConstString g___kCFBooleanTrue("__kCFBooleanTrue"); + static ConstString g_double_underscore_kCFBooleanFalse("__kCFBooleanFalse"); + static ConstString g_double_underscore_kCFBooleanTrue("__kCFBooleanTrue"); static ConstString g_kCFBooleanFalse("kCFBooleanFalse"); static ConstString g_kCFBooleanTrue("kCFBooleanTrue"); @@ -3045,8 +3045,8 @@ return addr; }; - lldb::addr_t false_addr = get_symbol(g___kCFBooleanFalse, g_kCFBooleanFalse); - lldb::addr_t true_addr = get_symbol(g___kCFBooleanTrue, g_kCFBooleanTrue); + lldb::addr_t false_addr = get_symbol(g_double_underscore_kCFBooleanFalse, g_kCFBooleanFalse); + lldb::addr_t true_addr = get_symbol(g_double_underscore_kCFBooleanTrue, g_kCFBooleanTrue); return (m_CFBoolean_values = {false_addr, true_addr}).operator bool(); }