OLD | NEW |
1 //===- subzero/src/IceTypes.h - Primitive ICE types -------------*- C++ -*-===// | 1 //===- subzero/src/IceTypes.h - Primitive ICE types -------------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 inline StreamType &operator<<(StreamType &Str, const Type &Ty) { | 122 inline StreamType &operator<<(StreamType &Str, const Type &Ty) { |
123 Str << typeString(Ty); | 123 Str << typeString(Ty); |
124 return Str; | 124 return Str; |
125 } | 125 } |
126 | 126 |
127 /// Models a type signature for a function. | 127 /// Models a type signature for a function. |
128 class FuncSigType { | 128 class FuncSigType { |
129 FuncSigType &operator=(const FuncSigType &Ty) = delete; | 129 FuncSigType &operator=(const FuncSigType &Ty) = delete; |
130 | 130 |
131 public: | 131 public: |
132 typedef std::vector<Type> ArgListType; | 132 using ArgListType = std::vector<Type>; |
133 | 133 |
134 /// Creates a function signature type with the given return type. | 134 /// Creates a function signature type with the given return type. |
135 /// Parameter types should be added using calls to appendArgType. | 135 /// Parameter types should be added using calls to appendArgType. |
136 FuncSigType() = default; | 136 FuncSigType() = default; |
137 FuncSigType(const FuncSigType &Ty) = default; | 137 FuncSigType(const FuncSigType &Ty) = default; |
138 | 138 |
139 void appendArgType(Type ArgType) { ArgList.push_back(ArgType); } | 139 void appendArgType(Type ArgType) { ArgList.push_back(ArgType); } |
140 | 140 |
141 Type getReturnType() const { return ReturnType; } | 141 Type getReturnType() const { return ReturnType; } |
142 void setReturnType(Type NewType) { ReturnType = NewType; } | 142 void setReturnType(Type NewType) { ReturnType = NewType; } |
(...skipping 13 matching lines...) Expand all Loading... |
156 }; | 156 }; |
157 | 157 |
158 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { | 158 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { |
159 Sig.dump(Stream); | 159 Sig.dump(Stream); |
160 return Stream; | 160 return Stream; |
161 } | 161 } |
162 | 162 |
163 } // end of namespace Ice | 163 } // end of namespace Ice |
164 | 164 |
165 #endif // SUBZERO_SRC_ICETYPES_H | 165 #endif // SUBZERO_SRC_ICETYPES_H |
OLD | NEW |