Skip to content

Commit

Permalink
refactor: DWARFCompileUnit::Producer -> DWARFProducer
Browse files Browse the repository at this point in the history
Differential revision: https://reviews.llvm.org/D42891

llvm-svn: 324275
  • Loading branch information
jankratochvil committed Feb 5, 2018
1 parent fee3f41 commit 5039723
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
10 changes: 3 additions & 7 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Expand Up @@ -10,7 +10,6 @@
#include <stdlib.h>

#include "DWARFASTParserClang.h"
#include "DWARFCompileUnit.h"
#include "DWARFDIE.h"
#include "DWARFDIECollection.h"
#include "DWARFDebugInfo.h"
Expand Down Expand Up @@ -1767,8 +1766,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
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 "
Expand Down Expand Up @@ -2367,8 +2365,7 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die,
"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.");

Expand Down Expand Up @@ -3205,8 +3202,7 @@ bool DWARFASTParserClang::ParseChildMembers(

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 "
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
Expand Up @@ -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();
Expand Down Expand Up @@ -137,7 +137,7 @@ class DWARFCompileUnit {

SymbolFileDWARF *GetSymbolFileDWARF() const { return m_dwarf2Data; }

Producer GetProducer();
DWARFProducer GetProducer();

uint32_t GetProducerVersionMajor();

Expand Down Expand Up @@ -178,7 +178,7 @@ class DWARFCompileUnit {
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;
Expand Down

0 comments on commit 5039723

Please sign in to comment.