diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 5fe3001ecf5..90572c02e13 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -73,6 +73,7 @@ #include "llvm/Support/FileSystem.h" #include <map> +#include <memory> #include <ctype.h> #include <string.h> @@ -130,7 +131,7 @@ public: } PluginProperties() { - m_collection_sp.reset(new OptionValueProperties(GetSettingName())); + m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName()); m_collection_sp->Initialize(g_properties); } @@ -770,9 +771,9 @@ lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFUnit *dwarf_cu, cu_die.GetAttributeValueAsUnsigned(DW_AT_language, 0)); bool is_optimized = dwarf_cu->GetIsOptimized(); - cu_sp.reset(new CompileUnit( + cu_sp = std::make_shared<CompileUnit>( module_sp, dwarf_cu, cu_file_spec, dwarf_cu->GetID(), - cu_language, is_optimized ? eLazyBoolYes : eLazyBoolNo)); + cu_language, is_optimized ? eLazyBoolYes : eLazyBoolNo); if (cu_sp) { // If we just created a compile unit with an invalid file spec, // try and get the first entry in the supports files from the @@ -3126,7 +3127,7 @@ size_t SymbolFileDWARF::ParseVariablesForContext(const SymbolContext &sc) { VariableListSP variables(sc.comp_unit->GetVariableList(false)); if (variables.get() == NULL) { - variables.reset(new VariableList()); + variables = std::make_shared<VariableList>(); sc.comp_unit->SetVariableList(variables); DIEArray die_offsets; @@ -3540,10 +3541,10 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc, type_sp->GetType()->GetByteSize().getValueOr(0), die.GetCU()->GetAddressByteSize()); - var_sp.reset(new Variable(die.GetID(), name, mangled, type_sp, scope, - symbol_context_scope, scope_ranges, &decl, - location, is_external, is_artificial, - is_static_member)); + var_sp = std::make_shared<Variable>( + die.GetID(), name, mangled, type_sp, scope, symbol_context_scope, + scope_ranges, &decl, location, is_external, is_artificial, + is_static_member); var_sp->SetLocationIsConstantValueData(location_is_const_value_data); } else { @@ -3641,7 +3642,7 @@ size_t SymbolFileDWARF::ParseVariables(const SymbolContext &sc, if (sc.comp_unit != NULL) { variable_list_sp = sc.comp_unit->GetVariableList(false); if (variable_list_sp.get() == NULL) { - variable_list_sp.reset(new VariableList()); + variable_list_sp = std::make_shared<VariableList>(); } } else { GetObjectFile()->GetModule()->ReportError( @@ -3680,7 +3681,7 @@ size_t SymbolFileDWARF::ParseVariables(const SymbolContext &sc, const bool can_create = false; variable_list_sp = block->GetBlockVariableList(can_create); if (variable_list_sp.get() == NULL) { - variable_list_sp.reset(new VariableList()); + variable_list_sp = std::make_shared<VariableList>(); block->SetVariableList(variable_list_sp); } } |

