summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-09-03 23:26:12 +0000
committerGreg Clayton <gclayton@apple.com>2010-09-03 23:26:12 +0000
commite41e58997c36b4f2d1071d79d84fb10419cce3bb (patch)
tree3fa506514483e46ebc5857977b3da3ff79251a5c /lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
parent207b9d62185776485f5788a584b026816afcd037 (diff)
downloadbcm5719-llvm-e41e58997c36b4f2d1071d79d84fb10419cce3bb.tar.gz
bcm5719-llvm-e41e58997c36b4f2d1071d79d84fb10419cce3bb.zip
Improved name demangling performance by 20% on darwin.
llvm-svn: 113032
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
index e5a55ca2bc7..8a21e1ec555 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -9,6 +9,7 @@
#include "DWARFCompileUnit.h"
+#include "lldb/Core/Mangled.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/Timer.h"
@@ -591,7 +592,7 @@ DWARFCompileUnit::Index
DWARFDebugInfoEntry::Attributes attributes;
const char *name = NULL;
- const char *mangled = NULL;
+ Mangled mangled;
bool is_variable = false;
bool is_declaration = false;
bool is_artificial = false;
@@ -629,7 +630,7 @@ DWARFCompileUnit::Index
case DW_AT_MIPS_linkage_name:
if (attributes.ExtractFormValueAtIndex(m_dwarf2Data, i, form_value))
- mangled = form_value.AsCString(debug_str);
+ mangled.GetMangledName().SetCString(form_value.AsCString(debug_str));
break;
case DW_AT_low_pc:
@@ -761,8 +762,10 @@ DWARFCompileUnit::Index
else
base_name_to_function_die.Append(ConstString(name).AsCString(), die.GetOffset());
}
- if (mangled)
- full_name_to_function_die.Append(ConstString(mangled).AsCString(), die.GetOffset());
+ if (mangled.GetMangledName())
+ full_name_to_function_die.Append(mangled.GetMangledName().AsCString(), die.GetOffset());
+ if (mangled.GetDemangledName())
+ full_name_to_function_die.Append(mangled.GetDemangledName().AsCString(), die.GetOffset());
}
break;
@@ -771,8 +774,10 @@ DWARFCompileUnit::Index
{
if (name)
base_name_to_function_die.Append(ConstString(name).AsCString(), die.GetOffset());
- if (mangled)
- full_name_to_function_die.Append(ConstString(mangled).AsCString(), die.GetOffset());
+ if (mangled.GetMangledName())
+ full_name_to_function_die.Append(mangled.GetMangledName().AsCString(), die.GetOffset());
+ if (mangled.GetDemangledName())
+ full_name_to_function_die.Append(mangled.GetDemangledName().AsCString(), die.GetOffset());
}
break;
OpenPOWER on IntegriCloud