Author: jankratochvil Date: Mon Feb 5 13:50:01 2018 New Revision: 324275 URL: http://llvm.org/viewvc/llvm-project?rev=324275&view=rev Log: refactor: DWARFCompileUnit::Producer -> DWARFProducer
Differential revision: https://reviews.llvm.org/D42891 Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=324275&r1=324274&r2=324275&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Mon Feb 5 13:50:01 2018 @@ -10,7 +10,6 @@ #include <stdlib.h> #include "DWARFASTParserClang.h" -#include "DWARFCompileUnit.h" #include "DWARFDIE.h" #include "DWARFDIECollection.h" #include "DWARFDebugInfo.h" @@ -1767,8 +1766,7 @@ TypeSP DWARFASTParserClang::ParseTypeFro array_element_type.GetCompleteType() == false) { ModuleSP module_sp = die.GetModule(); if (module_sp) { - if (die.GetCU()->GetProducer() == - DWARFCompileUnit::eProducerClang) + if (die.GetCU()->GetProducer() == eProducerClang) module_sp->ReportError( "DWARF DW_TAG_array_type DIE at 0x%8.8x has a " "class/union/struct element type DIE 0x%8.8x that is a " @@ -2367,8 +2365,7 @@ bool DWARFASTParserClang::CompleteTypeFr "does not have a complete definition.", die.GetName(), base_class_type.GetTypeName().GetCString()); - if (die.GetCU()->GetProducer() == - DWARFCompileUnit::eProducerClang) + if (die.GetCU()->GetProducer() == eProducerClang) module->ReportError(":: Try compiling the source file with " "-fstandalone-debug."); @@ -3205,8 +3202,7 @@ bool DWARFASTParserClang::ParseChildMemb if (ClangASTContext::IsCXXClassType(member_clang_type) && member_clang_type.GetCompleteType() == false) { - if (die.GetCU()->GetProducer() == - DWARFCompileUnit::eProducerClang) + if (die.GetCU()->GetProducer() == eProducerClang) module_sp->ReportError( "DWARF DIE at 0x%8.8x (class %s) has a member variable " "0x%8.8x (%s) whose type is a forward declaration, not a " Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=324275&r1=324274&r2=324275&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Mon Feb 5 13:50:01 2018 @@ -1012,7 +1012,7 @@ void DWARFCompileUnit::ParseProducerInfo m_producer = eProcucerOther; } -DWARFCompileUnit::Producer DWARFCompileUnit::GetProducer() { +DWARFProducer DWARFCompileUnit::GetProducer() { if (m_producer == eProducerInvalid) ParseProducerInfo(); return m_producer; Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h?rev=324275&r1=324274&r2=324275&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h Mon Feb 5 13:50:01 2018 @@ -20,16 +20,16 @@ class SymbolFileDWARFDwo; typedef std::shared_ptr<DWARFCompileUnit> DWARFCompileUnitSP; +enum DWARFProducer { + eProducerInvalid = 0, + eProducerClang, + eProducerGCC, + eProducerLLVMGCC, + eProcucerOther +}; + class DWARFCompileUnit { public: - enum Producer { - eProducerInvalid = 0, - eProducerClang, - eProducerGCC, - eProducerLLVMGCC, - eProcucerOther - }; - static DWARFCompileUnitSP Extract(SymbolFileDWARF *dwarf2Data, lldb::offset_t *offset_ptr); ~DWARFCompileUnit(); @@ -137,7 +137,7 @@ public: SymbolFileDWARF *GetSymbolFileDWARF() const { return m_dwarf2Data; } - Producer GetProducer(); + DWARFProducer GetProducer(); uint32_t GetProducerVersionMajor(); @@ -178,7 +178,7 @@ protected: dw_offset_t m_length; uint16_t m_version; uint8_t m_addr_size; - Producer m_producer = eProducerInvalid; + DWARFProducer m_producer = eProducerInvalid; uint32_t m_producer_version_major = 0; uint32_t m_producer_version_minor = 0; uint32_t m_producer_version_update = 0; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits