summaryrefslogtreecommitdiff
path: root/include/lldb
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-14 15:39:46 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-14 15:39:46 +0000
commitafed7be32164a598f8172282c249af7266c48b46 (patch)
treed42e47aabc79449fbfcc454836954645f5c03334 /include/lldb
parent6f2913059696064e80328b389e44b199c1af526d (diff)
Notes
Diffstat (limited to 'include/lldb')
-rw-r--r--include/lldb/Core/Error.h11
-rw-r--r--include/lldb/Symbol/Type.h5
2 files changed, 14 insertions, 2 deletions
diff --git a/include/lldb/Core/Error.h b/include/lldb/Core/Error.h
index f33464816a16f..8131580991ad9 100644
--- a/include/lldb/Core/Error.h
+++ b/include/lldb/Core/Error.h
@@ -12,6 +12,7 @@
#if defined(__cplusplus)
#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/FormatVariadic.h"
#include <cstdarg>
#include <cstdio>
@@ -300,5 +301,15 @@ protected:
} // namespace lldb_private
+namespace llvm {
+template <> struct format_provider<lldb_private::Error> {
+ static void format(const lldb_private::Error &error, llvm::raw_ostream &OS,
+ llvm::StringRef Options) {
+ llvm::format_provider<llvm::StringRef>::format(error.AsCString(), OS,
+ Options);
+ }
+};
+}
+
#endif // #if defined(__cplusplus)
#endif // #ifndef __DCError_h__
diff --git a/include/lldb/Symbol/Type.h b/include/lldb/Symbol/Type.h
index 13c95e71ffeb9..b2a65fabf8f9a 100644
--- a/include/lldb/Symbol/Type.h
+++ b/include/lldb/Symbol/Type.h
@@ -201,8 +201,9 @@ public:
// From a fully qualified typename, split the type into the type basename
// and the remaining type scope (namespaces/classes).
- static bool GetTypeScopeAndBasename(const char *&name_cstr,
- std::string &scope, std::string &basename,
+ static bool GetTypeScopeAndBasename(const llvm::StringRef& name,
+ llvm::StringRef &scope,
+ llvm::StringRef &basename,
lldb::TypeClass &type_class);
void SetEncodingType(Type *encoding_type) { m_encoding_type = encoding_type; }