[Lldb-commits] [lldb] 039fc57 - ObjectFile: remove extraneous shadowed variable (NFCI)

Saleem Abdulrasool via lldb-commits lldb-commits at lists.llvm.org
Fri May 5 10:55:48 PDT 2023


Author: Saleem Abdulrasool
Date: 2023-05-05T10:55:29-07:00
New Revision: 039fc57191980847afb6e674cac8bcbb6c1efa13

URL: https://github.com/llvm/llvm-project/commit/039fc57191980847afb6e674cac8bcbb6c1efa13
DIFF: https://github.com/llvm/llvm-project/commit/039fc57191980847afb6e674cac8bcbb6c1efa13.diff

LOG: ObjectFile: remove extraneous shadowed variable (NFCI)

We already construct the shared pointer for the module.  Avoid creating
a shadow copy and use the original definition.

Added: 
    

Modified: 
    lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index cded6b5fe698f..905226d67c2b5 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -1046,7 +1046,6 @@ void ObjectFilePECOFF::CreateSections(SectionList &unified_section_list) {
     unified_section_list.AddSection(header_sp);
 
     const uint32_t nsects = m_sect_headers.size();
-    ModuleSP module_sp(GetModule());
     for (uint32_t idx = 0; idx < nsects; ++idx) {
       llvm::StringRef sect_name = GetSectionName(m_sect_headers[idx]);
       ConstString const_sect_name(sect_name);


        


More information about the lldb-commits mailing list