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

Unified Diff: src/IceTypes.cpp

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/IceTypes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTypes.cpp
diff --git a/src/IceTypes.cpp b/src/IceTypes.cpp
index 515be2d667aee80b3d70d6e295704958bec07961..0724e5146d116225e9351cf8074dc3c455d88446 100644
--- a/src/IceTypes.cpp
+++ b/src/IceTypes.cpp
@@ -81,18 +81,13 @@ Type typeElementType(Type Ty) {
return ElementType;
}
-// ======================== Dump routines ======================== //
-
-template <> Ostream &operator<<(Ostream &Str, const Type &Ty) {
+const char *typeString(Type Ty) {
size_t Index = static_cast<size_t>(Ty);
if (Index < TypeAttributesSize) {
- Str << TypeAttributes[Index].DisplayString;
- } else {
- Str << "???";
- llvm_unreachable("Invalid type for printing");
+ return TypeAttributes[Index].DisplayString;
}
-
- return Str;
+ llvm_unreachable("Invalid type for typeString");
+ return "???";
}
} // end of namespace Ice
« no previous file with comments | « src/IceTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698