Chromium Code Reviews| Index: src/IceTypes.h |
| diff --git a/src/IceTypes.h b/src/IceTypes.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1e8b043abb34e52a3eac8b401ff85fb7d7d4fdd2 |
| --- /dev/null |
| +++ b/src/IceTypes.h |
| @@ -0,0 +1,34 @@ |
| +//===- subzero/src/IceTypes.h - Primitive ICE types -------------*- C++ -*-===// |
| +// |
| +// The Subzero Code Generator |
| +// |
| +// This file is distributed under the University of Illinois Open Source |
| +// License. See LICENSE.TXT for details. |
| +// |
| +//===----------------------------------------------------------------------===// |
| +// |
| +// This file declares a few properties of the primitive types allowed |
| +// in Subzero. Every Subzero source file is expected to include |
| +// IceTypes.h. |
| +// |
| +//===----------------------------------------------------------------------===// |
| + |
| +#ifndef SUBZERO_SRC_ICETYPES_H |
| +#define SUBZERO_SRC_ICETYPES_H |
| + |
| +enum IceType { |
| + IceType_void, |
| + IceType_i1, |
| + IceType_i8, |
| + IceType_i16, |
| + IceType_i32, |
| + IceType_i64, |
| + IceType_f32, |
| + IceType_f64, |
| + IceType_NUM |
|
JF
2014/04/04 04:05:26
Comment on IceType_NUM needing to be the last enum
Jim Stichnoth
2014/04/06 02:16:09
Done. IceType_NUM is no longer used in this CL, b
|
| +}; |
| + |
| +uint32_t iceTypeWidth(IceType T); |
|
JF
2014/04/04 04:05:26
Bits or bytes? I'd rather have all width related f
Jim Stichnoth
2014/04/06 02:16:09
Done.
|
| +IceOstream &operator<<(class IceOstream &Str, IceType T); |
|
JF
2014/04/04 04:05:26
Could you make this a template so it works with an
Jim Stichnoth
2014/04/06 02:16:09
I made a templated operator << override which make
|
| + |
| +#endif // SUBZERO_SRC_ICETYPES_H |