OSDN Git Service

[CallSiteSplitting] Report edge deletion to DomTreeUpdater
[android-x86/external-llvm.git] / lib / TextAPI / MachO / TextStubCommon.h
1 //===- llvm/TextAPI/TextStubCommon.h - Text Stub Common ---------*- 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 /// \file
11 /// \brief Defines common Text Stub YAML mappings.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_TEXTAPI_TEXT_STUB_COMMON_H
16 #define LLVM_TEXTAPI_TEXT_STUB_COMMON_H
17
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/ADT/StringSwitch.h"
20 #include "llvm/Support/YAMLTraits.h"
21 #include "llvm/TextAPI/MachO/Architecture.h"
22 #include "llvm/TextAPI/MachO/ArchitectureSet.h"
23 #include "llvm/TextAPI/MachO/InterfaceFile.h"
24 #include "llvm/TextAPI/MachO/PackedVersion.h"
25
26 using UUID = std::pair<llvm::MachO::Architecture, std::string>;
27
28 LLVM_YAML_STRONG_TYPEDEF(llvm::StringRef, FlowStringRef)
29 LLVM_YAML_STRONG_TYPEDEF(uint8_t, SwiftVersion)
30 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(UUID)
31 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(FlowStringRef)
32
33 namespace llvm {
34 namespace yaml {
35
36 template <> struct ScalarTraits<FlowStringRef> {
37   static void output(const FlowStringRef &, void *, raw_ostream &);
38   static StringRef input(StringRef, void *, FlowStringRef &);
39   static QuotingType mustQuote(StringRef);
40 };
41
42 template <> struct ScalarEnumerationTraits<MachO::ObjCConstraintType> {
43   static void enumeration(IO &, MachO::ObjCConstraintType &);
44 };
45
46 template <> struct ScalarTraits<MachO::PlatformKind> {
47   static void output(const MachO::PlatformKind &, void *, raw_ostream &);
48   static StringRef input(StringRef, void *, MachO::PlatformKind &);
49   static QuotingType mustQuote(StringRef);
50 };
51
52 template <> struct ScalarBitSetTraits<MachO::ArchitectureSet> {
53   static void bitset(IO &, MachO::ArchitectureSet &);
54 };
55
56 template <> struct ScalarTraits<MachO::Architecture> {
57   static void output(const MachO::Architecture &, void *, raw_ostream &);
58   static StringRef input(StringRef, void *, MachO::Architecture &);
59   static QuotingType mustQuote(StringRef);
60 };
61
62 template <> struct ScalarTraits<MachO::PackedVersion> {
63   static void output(const MachO::PackedVersion &, void *, raw_ostream &);
64   static StringRef input(StringRef, void *, MachO::PackedVersion &);
65   static QuotingType mustQuote(StringRef);
66 };
67
68 template <> struct ScalarTraits<SwiftVersion> {
69   static void output(const SwiftVersion &, void *, raw_ostream &);
70   static StringRef input(StringRef, void *, SwiftVersion &);
71   static QuotingType mustQuote(StringRef);
72 };
73
74 template <> struct ScalarTraits<UUID> {
75   static void output(const UUID &, void *, raw_ostream &);
76   static StringRef input(StringRef, void *, UUID &);
77   static QuotingType mustQuote(StringRef);
78 };
79
80 } // end namespace yaml.
81 } // end namespace llvm.
82
83 #endif // LLVM_TEXTAPI_TEXT_STUB_COMMON_H