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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTypes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTypes.h
diff --git a/src/IceTypes.h b/src/IceTypes.h
index 6bc2ded5ec63f8d9d388eef2cd14426a7a6b8928..fa917636583abde7e91cb51b725e15bd9488f901 100644
--- a/src/IceTypes.h
+++ b/src/IceTypes.h
@@ -45,10 +45,15 @@ size_t typeWidthInBytes(Type Ty);
size_t typeAlignInBytes(Type Ty);
size_t typeNumElements(Type Ty);
Type typeElementType(Type Ty);
+const char *typeString(Type Ty);
inline bool isVectorType(Type Ty) { return typeNumElements(Ty) > 1; }
-template <> Ostream &operator<<(class Ostream &Str, const Type &Ty);
+template <typename StreamType>
+inline StreamType &operator<<(StreamType &Str, const Type &Ty) {
+ Str << typeString(Ty);
+ return Str;
+}
} // end of namespace Ice
« 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