mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 19:07:53 +08:00
Cleanup logging to use the new "std::string FileSpec::GetPath()" function. Also added a similar function for modules:
std::string
Module::GetSpecificationDescription () const;
This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it.
llvm-svn: 180717
This commit is contained in:
@@ -59,13 +59,9 @@ SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(SymbolFileDWARFDebugMa
|
||||
if (log)
|
||||
{
|
||||
ConstString object_name (oso_module->GetObjectName());
|
||||
log->Printf("%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s/%s%s%s%s')",
|
||||
log->Printf("%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s')",
|
||||
this,
|
||||
oso_module->GetFileSpec().GetDirectory().GetCString(),
|
||||
oso_module->GetFileSpec().GetFilename().GetCString(),
|
||||
object_name ? "(" : "",
|
||||
object_name ? object_name.GetCString() : "",
|
||||
object_name ? ")" : "");
|
||||
oso_module->GetSpecificationDescription().c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -1415,10 +1411,9 @@ SymbolFileDWARFDebugMap::FinalizeOSOFileRanges (CompileUnitInfo *cu_info)
|
||||
#if defined(DEBUG_OSO_DMAP)
|
||||
const FileRangeMap &oso_file_range_map = cu_info->GetFileRangeMap(this);
|
||||
const size_t n = oso_file_range_map.GetSize();
|
||||
printf ("SymbolFileDWARFDebugMap::FinalizeOSOFileRanges (cu_info = %p) %s/%s\n",
|
||||
printf ("SymbolFileDWARFDebugMap::FinalizeOSOFileRanges (cu_info = %p) %s\n",
|
||||
cu_info,
|
||||
cu_info->oso_sp->module_sp->GetFileSpec().GetDirectory().GetCString(),
|
||||
cu_info->oso_sp->module_sp->GetFileSpec().GetFilename().GetCString());
|
||||
cu_info->oso_sp->module_sp->GetFileSpec().GetPath().c_str());
|
||||
for (size_t i=0; i<n; ++i)
|
||||
{
|
||||
const FileRangeMap::Entry &entry = oso_file_range_map.GetEntryRef(i);
|
||||
|
||||
Reference in New Issue
Block a user