Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: src/IceTypes.h

Issue 413393005: Subzero: Make Ice::Ostream a typedef for llvm::raw_ostream. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTypes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file declares a few properties of the primitive types allowed 10 // This file declares a few properties of the primitive types allowed
(...skipping 27 matching lines...) Expand all
38 Opt_m1, 38 Opt_m1,
39 Opt_0, 39 Opt_0,
40 Opt_1, 40 Opt_1,
41 Opt_2 41 Opt_2
42 }; 42 };
43 43
44 size_t typeWidthInBytes(Type Ty); 44 size_t typeWidthInBytes(Type Ty);
45 size_t typeAlignInBytes(Type Ty); 45 size_t typeAlignInBytes(Type Ty);
46 size_t typeNumElements(Type Ty); 46 size_t typeNumElements(Type Ty);
47 Type typeElementType(Type Ty); 47 Type typeElementType(Type Ty);
48 const char *typeString(Type Ty);
48 49
49 inline bool isVectorType(Type Ty) { return typeNumElements(Ty) > 1; } 50 inline bool isVectorType(Type Ty) { return typeNumElements(Ty) > 1; }
50 51
51 template <> Ostream &operator<<(class Ostream &Str, const Type &Ty); 52 template <typename StreamType>
53 inline StreamType &operator<<(StreamType &Str, const Type &Ty) {
54 Str << typeString(Ty);
55 return Str;
56 }
52 57
53 } // end of namespace Ice 58 } // end of namespace Ice
54 59
55 #endif // SUBZERO_SRC_ICETYPES_H 60 #endif // SUBZERO_SRC_ICETYPES_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698