@@ -98,27 +98,34 @@ llvm::Error writeMsgStructToSocket(llvm::raw_socket_stream &Socket,
98
98
99
99
} // namespace clang::tooling::cc1modbuildd
100
100
101
- namespace cc1mod = clang::tooling::cc1modbuildd;
102
-
103
- template <> struct llvm ::yaml::ScalarEnumerationTraits<cc1mod::StatusType> {
104
- static void enumeration (IO &Io, cc1mod::StatusType &Value) {
105
- Io.enumCase (Value, " REQUEST" , cc1mod::StatusType::REQUEST);
106
- Io.enumCase (Value, " SUCCESS" , cc1mod::StatusType::SUCCESS);
107
- Io.enumCase (Value, " FAILURE" , cc1mod::StatusType::FAILURE);
101
+ namespace llvm {
102
+ namespace yaml {
103
+ template <>
104
+ struct ScalarEnumerationTraits <clang::tooling::cc1modbuildd::StatusType> {
105
+ static void enumeration (IO &Io, clang::tooling::cc1modbuildd::StatusType &S) {
106
+ Io.enumCase (S, " REQUEST" ,
107
+ clang::tooling::cc1modbuildd::StatusType::REQUEST);
108
+ Io.enumCase (S, " SUCCESS" ,
109
+ clang::tooling::cc1modbuildd::StatusType::SUCCESS);
110
+ Io.enumCase (S, " FAILURE" ,
111
+ clang::tooling::cc1modbuildd::StatusType::FAILURE);
108
112
}
109
113
};
110
114
111
- template <> struct llvm ::yaml::ScalarEnumerationTraits<cc1mod::ActionType> {
112
- static void enumeration (IO &Io, cc1mod::ActionType &Value) {
113
- Io.enumCase (Value, " HANDSHAKE" , cc1mod::ActionType::HANDSHAKE);
115
+ template <>
116
+ struct ScalarEnumerationTraits <clang::tooling::cc1modbuildd::ActionType> {
117
+ static void enumeration (IO &Io, clang::tooling::cc1modbuildd::ActionType &A) {
118
+ Io.enumCase (A, " HANDSHAKE" ,
119
+ clang::tooling::cc1modbuildd::ActionType::HANDSHAKE);
114
120
}
115
121
};
116
122
117
- template <> struct llvm ::yaml::MappingTraits<cc1mod ::HandshakeMsg> {
118
- static void mapping (IO &Io, cc1mod:: HandshakeMsg &Info ) {
119
- Io.mapRequired (" Action" , Info .MsgAction );
120
- Io.mapRequired (" Status" , Info .MsgStatus );
123
+ template <> struct MappingTraits <clang::tooling::cc1modbuildd ::HandshakeMsg> {
124
+ static void mapping (IO &Io, clang::tooling::cc1modbuildd:: HandshakeMsg &H ) {
125
+ Io.mapRequired (" Action" , H .MsgAction );
126
+ Io.mapRequired (" Status" , H .MsgStatus );
121
127
}
122
128
};
123
-
129
+ } // namespace yaml
130
+ } // namespace llvm
124
131
#endif // LLVM_CLANG_TOOLING_MODULEBUILDDAEMON_SOCKETMSGSUPPORT_H
0 commit comments