summaryrefslogtreecommitdiff
path: root/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:53:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:53:01 +0000
commitead246455adf1a215ec2715dad6533073a6beb4e (patch)
treef3f97a47d77053bf96fe74cdbd6fae74380e8a92 /source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
parentfdb00c4408990a0a63ef7f496d809ce59f263bc5 (diff)
Notes
Diffstat (limited to 'source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp')
-rw-r--r--source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp32
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;