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 | |
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')
6 files changed, 97 insertions, 97 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp index 5f36638f57c..ab68985691b 100644 --- a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp +++ b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp @@ -123,9 +123,9 @@ Symtab *ObjectFileBreakpad::GetSymtab() { } void ObjectFileBreakpad::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap = llvm::make_unique<SectionList>(); + m_sections_up = llvm::make_unique<SectionList>(); llvm::Optional<Record::Kind> current_section; offset_t section_start; @@ -141,7 +141,7 @@ void ObjectFileBreakpad::CreateSections(SectionList &unified_section_list) { ConstString(toString(*current_section)), eSectionTypeOther, /*file_vm_addr*/ 0, /*vm_size*/ 0, section_start, end_offset - section_start, /*log2align*/ 0, /*flags*/ 0); - m_sections_ap->AddSection(section_sp); + m_sections_up->AddSection(section_sp); unified_section_list.AddSection(section_sp); }; while (!text.empty()) { diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index eaafa84db03..e6a39dbc54d 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -435,11 +435,11 @@ ObjectFile *ObjectFileELF::CreateInstance(const lldb::ModuleSP &module_sp, unsigned address_size = ELFHeader::AddressSizeInBytes(magic); if (address_size == 4 || address_size == 8) { - std::unique_ptr<ObjectFileELF> objfile_ap(new ObjectFileELF( + std::unique_ptr<ObjectFileELF> objfile_up(new ObjectFileELF( module_sp, data_sp, data_offset, file, file_offset, length)); - ArchSpec spec = objfile_ap->GetArchitecture(); - if (spec && objfile_ap->SetModulesArchitecture(spec)) - return objfile_ap.release(); + ArchSpec spec = objfile_up->GetArchitecture(); + if (spec && objfile_up->SetModulesArchitecture(spec)) + return objfile_up.release(); } return NULL; @@ -453,11 +453,11 @@ ObjectFile *ObjectFileELF::CreateMemoryInstance( if (ELFHeader::MagicBytesMatch(magic)) { unsigned address_size = ELFHeader::AddressSizeInBytes(magic); if (address_size == 4 || address_size == 8) { - std::unique_ptr<ObjectFileELF> objfile_ap( + std::unique_ptr<ObjectFileELF> objfile_up( new ObjectFileELF(module_sp, data_sp, process_sp, header_addr)); - ArchSpec spec = objfile_ap->GetArchitecture(); - if (spec && objfile_ap->SetModulesArchitecture(spec)) - return objfile_ap.release(); + ArchSpec spec = objfile_up->GetArchitecture(); + if (spec && objfile_up->SetModulesArchitecture(spec)) + return objfile_up.release(); } } } @@ -774,7 +774,7 @@ ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp, : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset), m_header(), m_uuid(), m_gnu_debuglink_file(), m_gnu_debuglink_crc(0), m_program_headers(), m_section_headers(), m_dynamic_symbols(), - m_filespec_ap(), m_entry_point_address(), m_arch_spec() { + m_filespec_up(), m_entry_point_address(), m_arch_spec() { if (file) m_file = *file; ::memset(&m_header, 0, sizeof(m_header)); @@ -787,7 +787,7 @@ ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp, : ObjectFile(module_sp, process_sp, header_addr, header_data_sp), m_header(), m_uuid(), m_gnu_debuglink_file(), m_gnu_debuglink_crc(0), m_program_headers(), m_section_headers(), m_dynamic_symbols(), - m_filespec_ap(), m_entry_point_address(), m_arch_spec() { + m_filespec_up(), m_entry_point_address(), m_arch_spec() { ::memset(&m_header, 0, sizeof(m_header)); } @@ -950,7 +950,7 @@ uint32_t ObjectFileELF::GetDependentModules(FileSpecList &files) { uint32_t num_specs = 0; for (unsigned i = 0; i < num_modules; ++i) { - if (files.AppendIfUnique(m_filespec_ap->GetFileSpecAtIndex(i))) + if (files.AppendIfUnique(m_filespec_up->GetFileSpecAtIndex(i))) num_specs++; } @@ -1057,10 +1057,10 @@ Address ObjectFileELF::GetBaseAddress() { // ParseDependentModules //---------------------------------------------------------------------- size_t ObjectFileELF::ParseDependentModules() { - if (m_filespec_ap) - return m_filespec_ap->GetSize(); + if (m_filespec_up) + return m_filespec_up->GetSize(); - m_filespec_ap.reset(new FileSpecList()); + m_filespec_up.reset(new FileSpecList()); if (!ParseSectionHeaders()) return 0; @@ -1107,11 +1107,11 @@ size_t ObjectFileELF::ParseDependentModules() { const char *lib_name = dynstr_data.PeekCStr(str_index); FileSpec file_spec(lib_name); FileSystem::Instance().Resolve(file_spec); - m_filespec_ap->Append(file_spec); + m_filespec_up->Append(file_spec); } } - return m_filespec_ap->GetSize(); + return m_filespec_up->GetSize(); } //---------------------------------------------------------------------- @@ -1931,10 +1931,10 @@ public: } void ObjectFileELF::CreateSections(SectionList &unified_section_list) { - if (m_sections_ap) + if (m_sections_up) return; - m_sections_ap = llvm::make_unique<SectionList>(); + m_sections_up = llvm::make_unique<SectionList>(); VMAddressProvider address_provider(CalculateType()); size_t LoadID = 0; @@ -1954,7 +1954,7 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) { eSectionTypeContainer, InfoOr->GetRangeBase(), InfoOr->GetByteSize(), PHdr.p_offset, PHdr.p_filesz, Log2Align, /*flags*/ 0); Segment->SetPermissions(GetPermissions(PHdr)); - m_sections_ap->AddSection(Segment); + m_sections_up->AddSection(Segment); address_provider.AddSegment(*InfoOr, std::move(Segment)); } @@ -2000,7 +2000,7 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) { section_sp->SetPermissions(GetPermissions(header)); section_sp->SetIsThreadSpecific(header.sh_flags & SHF_TLS); - (InfoOr->Segment ? InfoOr->Segment->GetChildren() : *m_sections_ap) + (InfoOr->Segment ? InfoOr->Segment->GetChildren() : *m_sections_up) .AddSection(section_sp); address_provider.AddSection(std::move(*InfoOr), std::move(section_sp)); } @@ -2008,7 +2008,7 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) { // For eTypeDebugInfo files, the Symbol Vendor will take care of updating the // unified section list. if (GetType() != eTypeDebugInfo) - unified_section_list = *m_sections_ap; + unified_section_list = *m_sections_up; } // Find the arm/aarch64 mapping symbol character in the given symbol name. @@ -2384,7 +2384,7 @@ unsigned ObjectFileELF::ParseSymbolTable(Symtab *symbol_table, } // Get section list for this object file. - SectionList *section_list = m_sections_ap.get(); + SectionList *section_list = m_sections_up.get(); if (!section_list) return 0; @@ -2612,7 +2612,7 @@ ObjectFileELF::ParseTrampolineSymbols(Symtab *symbol_table, user_id_t start_id, if (!sym_hdr) return 0; - SectionList *section_list = m_sections_ap.get(); + SectionList *section_list = m_sections_up.get(); if (!section_list) return 0; @@ -2805,7 +2805,7 @@ Symtab *ObjectFileELF::GetSymtab() { if (module_obj_file && module_obj_file != this) return module_obj_file->GetSymtab(); - if (m_symtab_ap == NULL) { + if (m_symtab_up == NULL) { SectionList *section_list = module_sp->GetSectionList(); if (!section_list) return NULL; @@ -2829,8 +2829,8 @@ Symtab *ObjectFileELF::GetSymtab() { .get(); } if (symtab) { - m_symtab_ap.reset(new Symtab(symtab->GetObjectFile())); - symbol_id += ParseSymbolTable(m_symtab_ap.get(), symbol_id, symtab); + m_symtab_up.reset(new Symtab(symtab->GetObjectFile())); + symbol_id += ParseSymbolTable(m_symtab_up.get(), symbol_id, symtab); } // DT_JMPREL @@ -2854,30 +2854,30 @@ Symtab *ObjectFileELF::GetSymtab() { GetSectionHeaderByIndex(reloc_id); assert(reloc_header); - if (m_symtab_ap == nullptr) - m_symtab_ap.reset(new Symtab(reloc_section->GetObjectFile())); + if (m_symtab_up == nullptr) + m_symtab_up.reset(new Symtab(reloc_section->GetObjectFile())); - ParseTrampolineSymbols(m_symtab_ap.get(), symbol_id, reloc_header, + ParseTrampolineSymbols(m_symtab_up.get(), symbol_id, reloc_header, reloc_id); } } DWARFCallFrameInfo *eh_frame = GetUnwindTable().GetEHFrameInfo(); if (eh_frame) { - if (m_symtab_ap == nullptr) - m_symtab_ap.reset(new Symtab(this)); - ParseUnwindSymbols(m_symtab_ap.get(), eh_frame); + if (m_symtab_up == nullptr) + m_symtab_up.reset(new Symtab(this)); + ParseUnwindSymbols(m_symtab_up.get(), eh_frame); } // If we still don't have any symtab then create an empty instance to avoid // do the section lookup next time. - if (m_symtab_ap == nullptr) - m_symtab_ap.reset(new Symtab(this)); + if (m_symtab_up == nullptr) + m_symtab_up.reset(new Symtab(this)); - m_symtab_ap->CalculateSymbolSizes(); + m_symtab_up->CalculateSymbolSizes(); } - return m_symtab_ap.get(); + return m_symtab_up.get(); } void ObjectFileELF::RelocateSection(lldb_private::Section *section) @@ -3276,7 +3276,7 @@ void ObjectFileELF::DumpDependentModules(lldb_private::Stream *s) { if (num_modules > 0) { s->PutCString("Dependent Modules:\n"); for (unsigned i = 0; i < num_modules; ++i) { - const FileSpec &spec = m_filespec_ap->GetFileSpecAtIndex(i); + const FileSpec &spec = m_filespec_up->GetFileSpecAtIndex(i); s->Printf(" %s\n", spec.GetFilename().GetCString()); } } diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h index fb51212a0a5..668cfa36566 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -210,7 +210,7 @@ private: /// List of file specifications corresponding to the modules (shared /// libraries) on which this object file depends. - mutable std::unique_ptr<lldb_private::FileSpecList> m_filespec_ap; + mutable std::unique_ptr<lldb_private::FileSpecList> m_filespec_up; /// Cached value of the entry point for this module. lldb_private::Address m_entry_point_address; @@ -264,7 +264,7 @@ private: lldb_private::ArchSpec &arch_spec); /// Scans the dynamic section and locates all dependent modules (shared - /// libraries) populating m_filespec_ap. This method will compute the + /// libraries) populating m_filespec_up. This method will compute the /// dependent module list only once. Returns the number of dependent /// modules parsed. size_t ParseDependentModules(); @@ -274,7 +274,7 @@ private: /// number of dynamic symbols parsed. size_t ParseDynamicSymbols(); - /// Populates m_symtab_ap will all non-dynamic linker symbols. This method + /// Populates m_symtab_up will all non-dynamic linker symbols. This method /// will parse the symbols only once. Returns the number of symbols parsed. unsigned ParseSymbolTable(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp index 46daa5e9c21..2c9fed26b8c 100644 --- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -115,18 +115,18 @@ Symtab *ObjectFileJIT::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()); ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock()); if (delegate_sp) - delegate_sp->PopulateSymtab(this, *m_symtab_ap); + delegate_sp->PopulateSymtab(this, *m_symtab_up); // TODO: get symbols from delegate - m_symtab_ap->Finalize(); + m_symtab_up->Finalize(); } } - return m_symtab_ap.get(); + return m_symtab_up.get(); } bool ObjectFileJIT::IsStripped() { @@ -134,12 +134,12 @@ bool ObjectFileJIT::IsStripped() { } void ObjectFileJIT::CreateSections(SectionList &unified_section_list) { - if (!m_sections_ap) { - m_sections_ap.reset(new SectionList()); + if (!m_sections_up) { + m_sections_up.reset(new SectionList()); ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock()); if (delegate_sp) { - delegate_sp->PopulateSectionList(this, *m_sections_ap); - unified_section_list = *m_sections_ap; + delegate_sp->PopulateSectionList(this, *m_sections_up); + unified_section_list = *m_sections_up; } } } @@ -161,8 +161,8 @@ void ObjectFileJIT::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); } } 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); } } diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 5ad6abe4d22..ddc59aea62e 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -83,16 +83,16 @@ ObjectFile *ObjectFilePECOFF::CreateInstance(const lldb::ModuleSP &module_sp, return nullptr; } - auto objfile_ap = llvm::make_unique<ObjectFilePECOFF>( + auto objfile_up = llvm::make_unique<ObjectFilePECOFF>( module_sp, data_sp, data_offset, file, file_offset, length); - if (!objfile_ap || !objfile_ap->ParseHeader()) + if (!objfile_up || !objfile_up->ParseHeader()) return nullptr; // Cache coff binary. - if (!objfile_ap->CreateBinary()) + if (!objfile_up->CreateBinary()) return nullptr; - return objfile_ap.release(); + return objfile_up.release(); } ObjectFile *ObjectFilePECOFF::CreateMemoryInstance( @@ -100,10 +100,10 @@ ObjectFile *ObjectFilePECOFF::CreateMemoryInstance( const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) { if (!data_sp || !ObjectFilePECOFF::MagicBytesMatch(data_sp)) return nullptr; - auto objfile_ap = llvm::make_unique<ObjectFilePECOFF>( + auto objfile_up = llvm::make_unique<ObjectFilePECOFF>( 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 nullptr; } @@ -477,13 +477,13 @@ DataExtractor ObjectFilePECOFF::ReadImageData(uint32_t offset, size_t size) { ProcessSP process_sp(m_process_wp.lock()); DataExtractor data; if (process_sp) { - auto data_ap = llvm::make_unique<DataBufferHeap>(size, 0); + auto data_up = llvm::make_unique<DataBufferHeap>(size, 0); Status readmem_error; size_t bytes_read = - process_sp->ReadMemory(m_image_base + offset, data_ap->GetBytes(), - data_ap->GetByteSize(), readmem_error); + process_sp->ReadMemory(m_image_base + offset, data_up->GetBytes(), + data_up->GetByteSize(), readmem_error); if (bytes_read == size) { - DataBufferSP buffer_sp(data_ap.release()); + DataBufferSP buffer_sp(data_up.release()); data.SetData(buffer_sp, 0, buffer_sp->GetByteSize()); } } @@ -552,10 +552,10 @@ Symtab *ObjectFilePECOFF::GetSymtab() { ModuleSP module_sp(GetModule()); if (module_sp) { std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); - if (m_symtab_ap == NULL) { + if (m_symtab_up == NULL) { SectionList *sect_list = GetSectionList(); - m_symtab_ap.reset(new Symtab(this)); - std::lock_guard<std::recursive_mutex> guard(m_symtab_ap->GetMutex()); + m_symtab_up.reset(new Symtab(this)); + std::lock_guard<std::recursive_mutex> guard(m_symtab_up->GetMutex()); const uint32_t num_syms = m_coff_header.nsyms; @@ -579,7 +579,7 @@ Symtab *ObjectFilePECOFF::GetSymtab() { offset = 0; std::string symbol_name; - Symbol *symbols = m_symtab_ap->Resize(num_syms); + Symbol *symbols = m_symtab_up->Resize(num_syms); for (uint32_t i = 0; i < num_syms; ++i) { coff_symbol_t symbol; const uint32_t symbol_offset = offset; @@ -660,7 +660,7 @@ Symtab *ObjectFilePECOFF::GetSymtab() { lldb::offset_t name_ordinal_offset = export_table.address_of_name_ordinals - data_start; - Symbol *symbols = m_symtab_ap->Resize(export_table.number_of_names); + Symbol *symbols = m_symtab_up->Resize(export_table.number_of_names); std::string symbol_name; @@ -687,10 +687,10 @@ Symtab *ObjectFilePECOFF::GetSymtab() { symbols[i].SetDebug(true); } } - m_symtab_ap->CalculateSymbolSizes(); + m_symtab_up->CalculateSymbolSizes(); } } - return m_symtab_ap.get(); + return m_symtab_up.get(); } bool ObjectFilePECOFF::IsStripped() { @@ -699,9 +699,9 @@ bool ObjectFilePECOFF::IsStripped() { } void ObjectFilePECOFF::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()); ModuleSP module_sp(GetModule()); if (module_sp) { @@ -832,7 +832,7 @@ void ObjectFilePECOFF::CreateSections(SectionList &unified_section_list) { // section_sp->SetIsEncrypted (segment_is_encrypted); unified_section_list.AddSection(section_sp); - m_sections_ap->AddSection(section_sp); + m_sections_up->AddSection(section_sp); } } } @@ -948,8 +948,8 @@ void ObjectFilePECOFF::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); if (m_dos_header.e_magic) DumpDOSHeader(s, m_dos_header); |