jankratochvil created this revision.
jankratochvil added a reviewer: clayborg.
Herald added a subscriber: JDevlieghere.
jankratochvil added a dependent revision: D40466: DWZ 03/12: DWARFCompileUnit
split to DWARFCompileUnitData.
https://reviews.llvm.org/D40466#inline-354567 suggested to make Producer a
standalone enum.
https://reviews.llvm.org/D42891
Files:
source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
+++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
@@ -20,16 +20,16 @@
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 @@
SymbolFileDWARF *GetSymbolFileDWARF() const { return m_dwarf2Data; }
- Producer GetProducer();
+ DWARFProducer GetProducer();
uint32_t GetProducerVersionMajor();
@@ -178,7 +178,7 @@
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;
Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -1012,7 +1012,7 @@
m_producer = eProcucerOther;
}
-DWARFCompileUnit::Producer DWARFCompileUnit::GetProducer() {
+DWARFProducer DWARFCompileUnit::GetProducer() {
if (m_producer == eProducerInvalid)
ParseProducerInfo();
return m_producer;
Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -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 @@
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 @@
"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 @@
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 "
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits