diff --git a/lldb/include/lldb/Utility/ConstString.h b/lldb/include/lldb/Utility/ConstString.h --- a/lldb/include/lldb/Utility/ConstString.h +++ b/lldb/include/lldb/Utility/ConstString.h @@ -490,6 +490,11 @@ static QuotingType mustQuote(StringRef S) { return QuotingType::Double; } }; } // namespace yaml + +inline raw_ostream &operator<<(raw_ostream &os, lldb_private::ConstString s) { + os << s.GetStringRef(); + return os; +} } // namespace llvm LLVM_YAML_IS_SEQUENCE_VECTOR(lldb_private::ConstString) diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -337,7 +337,7 @@ if (name && name[0]) s << name << '.'; } - s << m_name.GetStringRef(); + s << m_name; } bool Section::IsDescendant(const Section *section) { diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -374,9 +374,9 @@ *s << "id = " << (const UserID &)*this; if (name) - *s << ", name = \"" << name.GetCString() << '"'; + s->AsRawOstream() << ", name = \"" << name << '"'; if (mangled) - *s << ", mangled = \"" << mangled.GetCString() << '"'; + s->AsRawOstream() << ", mangled = \"" << mangled << '"'; *s << ", range = "; Address::DumpStyle fallback_style; if (level == eDescriptionLevelVerbose)