summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-16 21:15:24 +0000
committerZachary Turner <zturner@google.com>2016-11-16 21:15:24 +0000
commitc156427ded1dfa7686c90cc56ad16013a079a742 (patch)
treef4912beeebd9e7a04e9c20a8e05d64e25bde192d /lldb/source/Plugins/SymbolFile
parent725dc14bb21da8a01709a6b3370a658d071689dc (diff)
downloadbcm5719-llvm-c156427ded1dfa7686c90cc56ad16013a079a742.tar.gz
bcm5719-llvm-c156427ded1dfa7686c90cc56ad16013a079a742.zip
Don't allow direct access to StreamString's internal buffer.
This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 44ff9cc9a5d..c5a62d52356 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2601,7 +2601,7 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(const SymbolContext &sc,
if (type_quals & clang::Qualifiers::Const)
sstr << " const";
- func_name.SetValue(ConstString(sstr.GetData()), false);
+ func_name.SetValue(ConstString(sstr.GetString()), false);
} else
func_name.SetValue(ConstString(name), false);
@@ -2815,7 +2815,7 @@ bool DWARFASTParserClang::ParseChildMembers(
ss.Printf("set%c%s:", toupper(prop_name[0]), &prop_name[1]);
- fixed_setter.SetCString(ss.GetData());
+ fixed_setter.SetString(ss.GetString());
prop_setter_name = fixed_setter.GetCString();
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
index 66dee4b7ff8..6d3ff8e3591 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -265,7 +265,7 @@ size_t DWARFCompileUnit::ExtractDIEsIfNeeded(bool cu_die_only) {
strm.Printf("error: no DIE for compile unit");
else
m_die_array[0].Dump(m_dwarf2Data, this, strm, UINT32_MAX);
- verbose_log->PutCString(strm.GetString().c_str());
+ verbose_log->PutString(strm.GetString());
}
if (!m_dwo_symbol_file)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index d82b3d42db8..392774544d1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3918,7 +3918,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
NULL);
GetObjectFile()->GetModule()->ReportError(
"0x%8.8x: %s has an invalid location: %s", die.GetOffset(),
- die.GetTagAsCString(), strm.GetString().c_str());
+ die.GetTagAsCString(), strm.GetData());
}
}
SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile();
OpenPOWER on IntegriCloud