summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo/CodeView/Formatters.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/Formatters.h')
-rw-r--r--include/llvm/DebugInfo/CodeView/Formatters.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/include/llvm/DebugInfo/CodeView/Formatters.h b/include/llvm/DebugInfo/CodeView/Formatters.h
index 1fbb0dd6f9b00..0842c1e373dbd 100644
--- a/include/llvm/DebugInfo/CodeView/Formatters.h
+++ b/include/llvm/DebugInfo/CodeView/Formatters.h
@@ -14,21 +14,27 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/DebugInfo/CodeView/TypeIndex.h"
#include "llvm/Support/FormatAdapters.h"
-#include "llvm/Support/FormatProviders.h"
#include "llvm/Support/FormatVariadic.h"
+#include "llvm/Support/raw_ostream.h"
+#include <cstdint>
namespace llvm {
+
namespace codeview {
+
namespace detail {
-class GuidAdapter final : public llvm::FormatAdapter<ArrayRef<uint8_t>> {
+
+class GuidAdapter final : public FormatAdapter<ArrayRef<uint8_t>> {
ArrayRef<uint8_t> Guid;
public:
explicit GuidAdapter(ArrayRef<uint8_t> Guid);
explicit GuidAdapter(StringRef Guid);
- void format(llvm::raw_ostream &Stream, StringRef Style);
+
+ void format(raw_ostream &Stream, StringRef Style) override ;
};
-}
+
+} // end namespace detail
inline detail::GuidAdapter fmt_guid(StringRef Item) {
return detail::GuidAdapter(Item);
@@ -37,11 +43,12 @@ inline detail::GuidAdapter fmt_guid(StringRef Item) {
inline detail::GuidAdapter fmt_guid(ArrayRef<uint8_t> Item) {
return detail::GuidAdapter(Item);
}
-}
+
+} // end namespace codeview
template <> struct format_provider<codeview::TypeIndex> {
public:
- static void format(const codeview::TypeIndex &V, llvm::raw_ostream &Stream,
+ static void format(const codeview::TypeIndex &V, raw_ostream &Stream,
StringRef Style) {
if (V.isNoneType())
Stream << "<no type>";
@@ -52,6 +59,7 @@ public:
}
}
};
-}
-#endif
+} // end namespace llvm
+
+#endif // LLVM_DEBUGINFO_CODEVIEW_FORMATTERS_H