diff options
Diffstat (limited to 'source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp')
| -rw-r--r-- | source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp | 32 | 
1 files changed, 13 insertions, 19 deletions
| diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp index 9d97ca15a252..5ee0687995a1 100644 --- a/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ b/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -342,7 +342,8 @@ void DWARFDIE::GetDWARFDeclContext(DWARFDeclContext &dwarf_decl_ctx) const {    }  } -void DWARFDIE::GetDeclContext(std::vector<CompilerContext> &context) const { +void DWARFDIE::GetDeclContext( +    llvm::SmallVectorImpl<lldb_private::CompilerContext> &context) const {    const dw_tag_t tag = Tag();    if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit)      return; @@ -351,40 +352,33 @@ void DWARFDIE::GetDeclContext(std::vector<CompilerContext> &context) const {      parent.GetDeclContext(context);    switch (tag) {    case DW_TAG_module: -    context.push_back( -        CompilerContext(CompilerContextKind::Module, ConstString(GetName()))); +    context.push_back({CompilerContextKind::Module, ConstString(GetName())});      break;    case DW_TAG_namespace: -    context.push_back(CompilerContext(CompilerContextKind::Namespace, -                                      ConstString(GetName()))); +    context.push_back({CompilerContextKind::Namespace, ConstString(GetName())});      break;    case DW_TAG_structure_type: -    context.push_back(CompilerContext(CompilerContextKind::Structure, -                                      ConstString(GetName()))); +    context.push_back({CompilerContextKind::Struct, ConstString(GetName())});      break;    case DW_TAG_union_type: -    context.push_back( -        CompilerContext(CompilerContextKind::Union, ConstString(GetName()))); +    context.push_back({CompilerContextKind::Union, ConstString(GetName())});      break;    case DW_TAG_class_type: -    context.push_back( -        CompilerContext(CompilerContextKind::Class, ConstString(GetName()))); +    context.push_back({CompilerContextKind::Class, ConstString(GetName())});      break;    case DW_TAG_enumeration_type: -    context.push_back(CompilerContext(CompilerContextKind::Enumeration, -                                      ConstString(GetName()))); +    context.push_back({CompilerContextKind::Enum, ConstString(GetName())});      break;    case DW_TAG_subprogram: -    context.push_back(CompilerContext(CompilerContextKind::Function, -                                      ConstString(GetPubname()))); +    context.push_back( +        {CompilerContextKind::Function, ConstString(GetPubname())});      break;    case DW_TAG_variable: -    context.push_back(CompilerContext(CompilerContextKind::Variable, -                                      ConstString(GetPubname()))); +    context.push_back( +        {CompilerContextKind::Variable, ConstString(GetPubname())});      break;    case DW_TAG_typedef: -    context.push_back( -        CompilerContext(CompilerContextKind::Typedef, ConstString(GetName()))); +    context.push_back({CompilerContextKind::Typedef, ConstString(GetName())});      break;    default:      break; | 
