aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Target/MemoryRegionInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target/MemoryRegionInfo.h')
-rw-r--r--include/lldb/Target/MemoryRegionInfo.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/lldb/Target/MemoryRegionInfo.h b/include/lldb/Target/MemoryRegionInfo.h
index be0cfa429b8f..0824b2442acc 100644
--- a/include/lldb/Target/MemoryRegionInfo.h
+++ b/include/lldb/Target/MemoryRegionInfo.h
@@ -11,8 +11,9 @@
#ifndef lldb_MemoryRegionInfo_h
#define lldb_MemoryRegionInfo_h
-#include "lldb/Core/ConstString.h"
#include "lldb/Core/RangeMap.h"
+#include "llvm/Support/FormatProviders.h"
+#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Range.h"
namespace lldb_private {
@@ -100,4 +101,24 @@ protected:
};
}
+namespace llvm {
+template <>
+struct format_provider<lldb_private::MemoryRegionInfo::OptionalBool> {
+ static void format(const lldb_private::MemoryRegionInfo::OptionalBool &B,
+ raw_ostream &OS, StringRef Options) {
+ switch(B) {
+ case lldb_private::MemoryRegionInfo::eNo:
+ OS << "no";
+ return;
+ case lldb_private::MemoryRegionInfo::eYes:
+ OS << "yes";
+ return;
+ case lldb_private::MemoryRegionInfo::eDontKnow:
+ OS << "don't know";
+ return;
+ }
+ }
+};
+}
+
#endif // #ifndef lldb_MemoryRegionInfo_h