diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/lldb/Core/Error.h | 11 | ||||
| -rw-r--r-- | include/lldb/Symbol/Type.h | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/lldb/Core/Error.h b/include/lldb/Core/Error.h index f33464816a16..8131580991ad 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 13c95e71ffeb..b2a65fabf8f9 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; } |
