diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-01 13:22:02 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-01 13:22:02 +0000 |
commit | 9df3605dea17e84f8183581f6103bd0c79e2a606 (patch) | |
tree | 70a2f36ce9eb9bb213603cd7f2f120af53fc176f /include/llvm/DebugInfo/CodeView/Formatters.h | |
parent | 08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (diff) |
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/Formatters.h')
-rw-r--r-- | include/llvm/DebugInfo/CodeView/Formatters.h | 24 |
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 |