Change SBAddress back to using a std::auto_ptr to a lldb_private::Address as the lldb_private::Address has a weak pointer to the section which has a weak pointer back to the module, so it is safe to have just a lldb_private::Address object now.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154045 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBLineEntry.cpp b/source/API/SBLineEntry.cpp
index db288bc..3f923e9 100644
--- a/source/API/SBLineEntry.cpp
+++ b/source/API/SBLineEntry.cpp
@@ -75,8 +75,9 @@
if (log)
{
StreamString sstr;
- if (sb_address.get())
- sb_address->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4);
+ const Address *addr = sb_address.get();
+ if (addr)
+ addr->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4);
log->Printf ("SBLineEntry(%p)::GetStartAddress () => SBAddress (%p): %s",
m_opaque_ap.get(), sb_address.get(), sstr.GetData());
}
@@ -97,8 +98,9 @@
if (log)
{
StreamString sstr;
- if (sb_address.get())
- sb_address->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4);
+ const Address *addr = sb_address.get();
+ if (addr)
+ addr->Dump (&sstr, NULL, Address::DumpStyleModuleWithFileAddress, Address::DumpStyleInvalid, 4);
log->Printf ("SBLineEntry(%p)::GetEndAddress () => SBAddress (%p): %s",
m_opaque_ap.get(), sb_address.get(), sstr.GetData());
}