]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/CodeView/Formatters.h
Merge ^/head r318658 through r318963.
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / DebugInfo / CodeView / Formatters.h
1 //===- Formatters.h ---------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_FORMATTERS_H
11 #define LLVM_DEBUGINFO_CODEVIEW_FORMATTERS_H
12
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/FormatAdapters.h"
16
17 namespace llvm {
18 namespace codeview {
19 namespace detail {
20 class GuidAdapter final : public llvm::FormatAdapter<ArrayRef<uint8_t>> {
21   ArrayRef<uint8_t> Guid;
22
23 public:
24   explicit GuidAdapter(ArrayRef<uint8_t> Guid);
25   explicit GuidAdapter(StringRef Guid);
26   void format(llvm::raw_ostream &Stream, StringRef Style);
27 };
28 }
29
30 inline detail::GuidAdapter fmt_guid(StringRef Item) {
31   return detail::GuidAdapter(Item);
32 }
33
34 inline detail::GuidAdapter fmt_guid(ArrayRef<uint8_t> Item) {
35   return detail::GuidAdapter(Item);
36 }
37 }
38 }
39
40 #endif