summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp14
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 44843c23d1f..77da93aa4e9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -3840,10 +3840,10 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
if (src_name) {
ConstString src_const_name(src_name);
if (src_die.GetAttributeValueAsUnsigned(DW_AT_artificial, 0))
- src_name_to_die_artificial.Append(src_const_name.GetCString(),
+ src_name_to_die_artificial.Append(src_const_name.GetStringRef(),
src_die);
else
- src_name_to_die.Append(src_const_name.GetCString(), src_die);
+ src_name_to_die.Append(src_const_name.GetStringRef(), src_die);
}
}
}
@@ -3860,10 +3860,10 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
if (dst_name) {
ConstString dst_const_name(dst_name);
if (dst_die.GetAttributeValueAsUnsigned(DW_AT_artificial, 0))
- dst_name_to_die_artificial.Append(dst_const_name.GetCString(),
+ dst_name_to_die_artificial.Append(dst_const_name.GetStringRef(),
dst_die);
else
- dst_name_to_die.Append(dst_const_name.GetCString(), dst_die);
+ dst_name_to_die.Append(dst_const_name.GetStringRef(), dst_die);
}
}
}
@@ -3976,7 +3976,7 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
src_name_to_die.Sort();
for (idx = 0; idx < dst_size; ++idx) {
- const char *dst_name = dst_name_to_die.GetCStringAtIndex(idx);
+ llvm::StringRef dst_name = dst_name_to_die.GetCStringAtIndex(idx);
dst_die = dst_name_to_die.GetValueAtIndexUnchecked(idx);
src_die = src_name_to_die.Find(dst_name, DWARFDIE());
@@ -4031,7 +4031,7 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
dst_name_to_die_artificial.Sort();
for (idx = 0; idx < src_size_artificial; ++idx) {
- const char *src_name_artificial =
+ llvm::StringRef src_name_artificial =
src_name_to_die_artificial.GetCStringAtIndex(idx);
src_die = src_name_to_die_artificial.GetValueAtIndexUnchecked(idx);
dst_die =
@@ -4075,7 +4075,7 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
if (dst_size_artificial) {
for (idx = 0; idx < dst_size_artificial; ++idx) {
- const char *dst_name_artificial =
+ llvm::StringRef dst_name_artificial =
dst_name_to_die_artificial.GetCStringAtIndex(idx);
dst_die = dst_name_to_die_artificial.GetValueAtIndexUnchecked(idx);
if (log)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
index df185267c08..61ccebdd420 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
@@ -28,11 +28,11 @@ void NameToDIE::Finalize() {
}
void NameToDIE::Insert(const ConstString &name, const DIERef &die_ref) {
- m_map.Append(name.GetCString(), die_ref);
+ m_map.Append(name.GetStringRef(), die_ref);
}
size_t NameToDIE::Find(const ConstString &name, DIEArray &info_array) const {
- return m_map.GetValues(name.GetCString(), info_array);
+ return m_map.GetValues(name.GetStringRef(), info_array);
}
size_t NameToDIE::Find(const RegularExpression &regex,
@@ -55,15 +55,15 @@ size_t NameToDIE::FindAllEntriesForCompileUnit(dw_offset_t cu_offset,
void NameToDIE::Dump(Stream *s) {
const uint32_t size = m_map.GetSize();
for (uint32_t i = 0; i < size; ++i) {
- const char *cstr = m_map.GetCStringAtIndex(i);
+ llvm::StringRef cstr = m_map.GetCStringAtIndex(i);
const DIERef &die_ref = m_map.GetValueAtIndexUnchecked(i);
- s->Printf("%p: {0x%8.8x/0x%8.8x} \"%s\"\n", (const void *)cstr,
+ s->Printf("%p: {0x%8.8x/0x%8.8x} \"%s\"\n", (const void *)cstr.data(),
die_ref.cu_offset, die_ref.die_offset, cstr);
}
}
void NameToDIE::ForEach(
- std::function<bool(const char *name, const DIERef &die_ref)> const
+ std::function<bool(llvm::StringRef name, const DIERef &die_ref)> const
&callback) const {
const uint32_t size = m_map.GetSize();
for (uint32_t i = 0; i < size; ++i) {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
index d9a7f197fa6..e3fe321338a 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
@@ -43,7 +43,7 @@ public:
DIEArray &info_array) const;
void
- ForEach(std::function<bool(const char *name, const DIERef &die_ref)> const
+ ForEach(std::function<bool(llvm::StringRef name, const DIERef &die_ref)> const
&callback) const;
protected:
OpenPOWER on IntegriCloud