forked from OSchip/llvm-project
Fix some use-after-frees that my last CL introduced.
llvm-svn: 286745
This commit is contained in:
parent
aa5611f56d
commit
8927f23abd
|
@ -139,7 +139,7 @@ public:
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
XMLNode GetRootElement(const char *required_name = nullptr);
|
XMLNode GetRootElement(const char *required_name = nullptr);
|
||||||
|
|
||||||
const std::string &GetErrors() const;
|
llvm::StringRef GetErrors() const;
|
||||||
|
|
||||||
static void ErrorCallback(void *ctx, const char *format, ...);
|
static void ErrorCallback(void *ctx, const char *format, ...);
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ public:
|
||||||
|
|
||||||
bool ParseFile(const char *path);
|
bool ParseFile(const char *path);
|
||||||
|
|
||||||
const std::string &GetErrors() const;
|
llvm::StringRef GetErrors() const;
|
||||||
|
|
||||||
explicit operator bool() const { return IsValid(); }
|
explicit operator bool() const { return IsValid(); }
|
||||||
|
|
||||||
|
|
|
@ -79,9 +79,7 @@ XMLNode XMLDocument::GetRootElement(const char *required_name) {
|
||||||
return XMLNode();
|
return XMLNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string &XMLDocument::GetErrors() const {
|
llvm::StringRef XMLDocument::GetErrors() const { return m_errors.GetString(); }
|
||||||
return m_errors.GetString();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool XMLDocument::XMLEnabled() {
|
bool XMLDocument::XMLEnabled() {
|
||||||
#if defined(LIBXML2_DEFINED)
|
#if defined(LIBXML2_DEFINED)
|
||||||
|
@ -391,7 +389,7 @@ ApplePropertyList::ApplePropertyList(const char *path)
|
||||||
|
|
||||||
ApplePropertyList::~ApplePropertyList() {}
|
ApplePropertyList::~ApplePropertyList() {}
|
||||||
|
|
||||||
const std::string &ApplePropertyList::GetErrors() const {
|
llvm::StringRef ApplePropertyList::GetErrors() const {
|
||||||
return m_xml_doc.GetErrors();
|
return m_xml_doc.GetErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue