summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp22
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h1
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp8
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp2
7 files changed, 19 insertions, 22 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
index e71d31963da..f4ee96b7c7d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
@@ -21,7 +21,7 @@ typedef std::multimap<const char*, dw_offset_t, CStringCompareFunctionObject> CS
typedef CStringToDIEMap::iterator CStringToDIEMapIter;
typedef CStringToDIEMap::const_iterator CStringToDIEMapConstIter;
-typedef lldb::SharedPtr<DWARFCompileUnit>::Type DWARFCompileUnitSP;
+typedef SHARED_PTR(DWARFCompileUnit) DWARFCompileUnitSP;
class DWARFDebugInfo
{
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
index 51e00628848..843d0812bef 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
@@ -68,7 +68,7 @@ public:
{
}
- typedef lldb::SharedPtr<Prologue>::Type shared_ptr;
+ typedef SHARED_PTR(Prologue) shared_ptr;
uint32_t total_length; // The size in bytes of the statement information for this compilation unit (not including the total_length field itself).
uint16_t version; // Version identifier for the statement information format.
@@ -135,7 +135,7 @@ public:
//------------------------------------------------------------------
struct LineTable
{
- typedef lldb::SharedPtr<LineTable>::Type shared_ptr;
+ typedef SHARED_PTR(LineTable) shared_ptr;
LineTable() :
prologue(),
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 816cd647de2..5e963508231 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2031,7 +2031,7 @@ SymbolFileDWARF::GetFunction (DWARFCompileUnit* curr_cu, const DWARFDebugInfoEnt
if (sc.function)
{
- sc.module_sp = sc.function->CalculateSymbolContextModule();
+ sc.module_sp = sc.function->CalculateSymbolContextModule()->shared_from_this();
return true;
}
@@ -2449,7 +2449,7 @@ SymbolFileDWARF::FindGlobalVariables (const ConstString &name, const lldb_privat
if (num_matches)
{
SymbolContext sc;
- sc.module_sp = m_obj_file->GetModule();
+ sc.module_sp = m_obj_file->GetModule()->shared_from_this();
assert (sc.module_sp);
DWARFDebugInfo* debug_info = DebugInfo();
@@ -2535,7 +2535,7 @@ SymbolFileDWARF::FindGlobalVariables(const RegularExpression& regex, bool append
}
SymbolContext sc;
- sc.module_sp = m_obj_file->GetModule();
+ sc.module_sp = m_obj_file->GetModule()->shared_from_this();
assert (sc.module_sp);
DWARFCompileUnit* dwarf_cu = NULL;
@@ -3149,7 +3149,7 @@ SymbolFileDWARF::FindTypes (const SymbolContext& sc,
if (matching_type)
{
// We found a type pointer, now find the shared pointer form our type list
- types.InsertUnique (TypeSP (matching_type));
+ types.InsertUnique (matching_type->shared_from_this());
if (types.GetSize() >= max_matches)
break;
}
@@ -3267,7 +3267,7 @@ SymbolFileDWARF::FindTypes(std::vector<dw_offset_t> die_offsets, uint32_t max_ma
if (matching_type)
{
// We found a type pointer, now find the shared pointer form our type list
- types.InsertUnique (TypeSP (matching_type));
+ types.InsertUnique (matching_type->shared_from_this());
++num_matches;
if (num_matches >= max_matches)
break;
@@ -3282,7 +3282,6 @@ SymbolFileDWARF::FindTypes(std::vector<dw_offset_t> die_offsets, uint32_t max_ma
size_t
SymbolFileDWARF::ParseChildParameters (const SymbolContext& sc,
clang::DeclContext *containing_decl_ctx,
- TypeSP& type_sp,
DWARFCompileUnit* dwarf_cu,
const DWARFDebugInfoEntry *parent_die,
bool skip_artificial,
@@ -3676,7 +3675,7 @@ SymbolFileDWARF::GetTypeForDIE (DWARFCompileUnit *curr_cu, const DWARFDebugInfoE
else if (type_ptr != DIE_IS_BEING_PARSED)
{
// Grab the existing type from the master types lists
- type_sp = type_ptr;
+ type_sp = type_ptr->shared_from_this();
}
}
@@ -4026,7 +4025,7 @@ SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE (const DWARFDebugInfoEntry
if (die)
m_die_to_type[die] = resolved_type;
- type_sp = resolved_type;
+ type_sp = resolved_type->shared_from_this();
break;
}
}
@@ -4148,7 +4147,7 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu,
MakeUserID(type_cu->GetOffset()));
m_die_to_type[die] = resolved_type;
- type_sp = resolved_type;
+ type_sp = resolved_type->shared_from_this();
break;
}
}
@@ -4934,7 +4933,6 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
bool skip_artificial = true;
ParseChildParameters (sc,
containing_decl_ctx,
- type_sp,
dwarf_cu,
die,
skip_artificial,
@@ -5120,7 +5118,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
type_ptr = m_die_to_type[die];
if (type_ptr)
{
- type_sp = type_ptr;
+ type_sp = type_ptr->shared_from_this();
break;
}
}
@@ -5343,7 +5341,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
else if (type_ptr != DIE_IS_BEING_PARSED)
{
- type_sp = type_ptr;
+ type_sp = type_ptr->shared_from_this();
}
}
return type_sp;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 7f4b16e015a..72ac34656fa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -347,7 +347,6 @@ protected:
size_t ParseChildParameters(
const lldb_private::SymbolContext& sc,
clang::DeclContext *containing_decl_ctx,
- lldb::TypeSP& type_sp,
DWARFCompileUnit* dwarf_cu,
const DWARFDebugInfoEntry *parent_die,
bool skip_artificial,
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 5c4fba29b49..2fa5a934dd1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -172,10 +172,10 @@ SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo (CompileUnitInfo *comp_unit_inf
// use the debug map, to add new sections to each .o file and
// even though a .o file might not have changed, the sections
// that get added to the .o file can change.
- comp_unit_info->oso_module_sp = new Module (oso_file_spec,
- m_obj_file->GetModule()->GetArchitecture(),
- NULL,
- 0);
+ comp_unit_info->oso_module_sp.reset (new Module (oso_file_spec,
+ m_obj_file->GetModule()->GetArchitecture(),
+ NULL,
+ 0));
}
}
return comp_unit_info->oso_module_sp.get();
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index 6d80d77d044..8dca2c5cd93 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -141,7 +141,7 @@ protected:
lldb_private::SymbolVendor *oso_symbol_vendor;
std::vector<uint32_t> function_indexes;
std::vector<uint32_t> static_indexes;
- lldb::SharedPtr<lldb_private::SectionList>::Type debug_map_sections_sp;
+ SHARED_PTR(lldb_private::SectionList) debug_map_sections_sp;
CompileUnitInfo() :
so_file (),
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
index d560bc3a838..6fc5968d9dd 100644
--- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
+++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
@@ -411,7 +411,7 @@ SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc,
Declaration decl;
- lldb::TypeSP type(new Type (iter->second,
+ lldb::TypeSP type(new Type (match->value,
this,
name,
0, // byte_size - don't change this from 0, we currently use that to identify these "synthetic" ObjC class types.
OpenPOWER on IntegriCloud