diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-02-13 06:25:41 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-02-13 06:25:41 +0000 |
commit | d5b440369dbb0d41e6ecd47d6ac7410201e27f17 (patch) | |
tree | 4dc2e3c44bcd3e14143715fa86584862b2290f9f /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | |
parent | 5cf777e41387c84518a9ff2ec1222058daf54e58 (diff) | |
download | bcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.tar.gz bcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.zip |
Replace 'ap' with 'up' suffix in variable names. (NFC)
The `ap` suffix is a remnant of lldb's former use of auto pointers,
before they got deprecated. Although all their uses were replaced by
unique pointers, some variables still carried the suffix.
In r353795 I removed another auto_ptr remnant, namely redundant calls to
::get for unique_pointers. Jim justly noted that this is a good
opportunity to clean up the variable names as well.
I went over all the changes to ensure my find-and-replace didn't have
any undesired side-effects. I hope I didn't miss any, but if you end up
at this commit doing a git blame on a weirdly named variable, please
know that the change was unintentional.
llvm-svn: 353912
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 22839990da8..035142a34a2 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -872,22 +872,22 @@ ObjectFile *ObjectFileMachO::CreateInstance(const lldb::ModuleSP &module_sp, return nullptr; data_offset = 0; } - auto objfile_ap = llvm::make_unique<ObjectFileMachO>( + auto objfile_up = llvm::make_unique<ObjectFileMachO>( module_sp, data_sp, data_offset, file, file_offset, length); - if (!objfile_ap || !objfile_ap->ParseHeader()) + if (!objfile_up || !objfile_up->ParseHeader()) return nullptr; - return objfile_ap.release(); + return objfile_up.release(); } ObjectFile *ObjectFileMachO::CreateMemoryInstance( const lldb::ModuleSP &module_sp, DataBufferSP &data_sp, const ProcessSP &process_sp, lldb::addr_t header_addr) { if (ObjectFileMachO::MagicBytesMatch(data_sp, 0, data_sp->GetByteSize())) { - std::unique_ptr<ObjectFile> objfile_ap( + std::unique_ptr<ObjectFile> objfile_up( new ObjectFileMachO(module_sp, data_sp, process_sp, header_addr)); - if (objfile_ap.get() && objfile_ap->ParseHeader()) - return objfile_ap.release(); + if (objfile_up.get() && objfile_up->ParseHeader()) + return objfile_up.release(); } return NULL; } @@ -1312,15 +1312,15 @@ Symtab *ObjectFileMachO::GetSymtab() { ModuleSP module_sp(GetModule()); if (module_sp) { std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); - if (m_symtab_ap == NULL) { - m_symtab_ap.reset(new Symtab(this)); + if (m_symtab_up == NULL) { + m_symtab_up.reset(new Symtab(this)); std::lock_guard<std::recursive_mutex> symtab_guard( - m_symtab_ap->GetMutex()); + m_symtab_up->GetMutex()); ParseSymtab(); - m_symtab_ap->Finalize(); + m_symtab_up->Finalize(); } } - return m_symtab_ap.get(); + return m_symtab_up.get(); } bool ObjectFileMachO::IsStripped() { @@ -1668,7 +1668,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_, load_cmd.flags); // Flags for this section segment_sp->SetIsEncrypted(segment_is_encrypted); - m_sections_ap->AddSection(segment_sp); + m_sections_up->AddSection(segment_sp); segment_sp->SetPermissions(segment_permissions); if (add_to_unified) context.UnifiedList.AddSection(segment_sp); @@ -1697,7 +1697,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_, context.FileAddressesChanged = true; } } - m_sections_ap->AddSection(unified_section_sp); + m_sections_up->AddSection(unified_section_sp); } struct section_64 sect64; @@ -1810,7 +1810,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_, load_cmd.flags); // Flags for this section segment_sp->SetIsFake(true); segment_sp->SetPermissions(segment_permissions); - m_sections_ap->AddSection(segment_sp); + m_sections_up->AddSection(segment_sp); if (add_to_unified) context.UnifiedList.AddSection(segment_sp); segment_sp->SetIsEncrypted(segment_is_encrypted); @@ -1877,10 +1877,10 @@ void ObjectFileMachO::ProcessDysymtabCommand(const load_command &load_cmd, } void ObjectFileMachO::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap.reset(new SectionList()); + m_sections_up.reset(new SectionList()); lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic); // bool dump_sections = false; @@ -2213,7 +2213,7 @@ size_t ObjectFileMachO::ParseSymtab() { } if (symtab_load_command.cmd) { - Symtab *symtab = m_symtab_ap.get(); + Symtab *symtab = m_symtab_up.get(); SectionList *section_list = GetSectionList(); if (section_list == NULL) return 0; @@ -4842,8 +4842,8 @@ void ObjectFileMachO::Dump(Stream *s) { if (sections) sections->Dump(s, NULL, true, UINT32_MAX); - if (m_symtab_ap) - m_symtab_ap->Dump(s, NULL, eSortOrderNone); + if (m_symtab_up) + m_symtab_up->Dump(s, NULL, eSortOrderNone); } } |