summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Host/XML.h4
-rw-r--r--lldb/source/Host/common/XML.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/lldb/include/lldb/Host/XML.h b/lldb/include/lldb/Host/XML.h
index c023739d0ad..4113b3318dd 100644
--- a/lldb/include/lldb/Host/XML.h
+++ b/lldb/include/lldb/Host/XML.h
@@ -139,7 +139,7 @@ public:
//----------------------------------------------------------------------
XMLNode GetRootElement(const char *required_name = nullptr);
- const std::string &GetErrors() const;
+ llvm::StringRef GetErrors() const;
static void ErrorCallback(void *ctx, const char *format, ...);
@@ -160,7 +160,7 @@ public:
bool ParseFile(const char *path);
- const std::string &GetErrors() const;
+ llvm::StringRef GetErrors() const;
explicit operator bool() const { return IsValid(); }
diff --git a/lldb/source/Host/common/XML.cpp b/lldb/source/Host/common/XML.cpp
index 39a0323b6cd..c637d938dff 100644
--- a/lldb/source/Host/common/XML.cpp
+++ b/lldb/source/Host/common/XML.cpp
@@ -79,9 +79,7 @@ XMLNode XMLDocument::GetRootElement(const char *required_name) {
return XMLNode();
}
-const std::string &XMLDocument::GetErrors() const {
- return m_errors.GetString();
-}
+llvm::StringRef XMLDocument::GetErrors() const { return m_errors.GetString(); }
bool XMLDocument::XMLEnabled() {
#if defined(LIBXML2_DEFINED)
@@ -391,7 +389,7 @@ ApplePropertyList::ApplePropertyList(const char *path)
ApplePropertyList::~ApplePropertyList() {}
-const std::string &ApplePropertyList::GetErrors() const {
+llvm::StringRef ApplePropertyList::GetErrors() const {
return m_xml_doc.GetErrors();
}
OpenPOWER on IntegriCloud