summaryrefslogtreecommitdiff
path: root/include/llvm/Assembly/CachedWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Assembly/CachedWriter.h')
-rw-r--r--include/llvm/Assembly/CachedWriter.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/llvm/Assembly/CachedWriter.h b/include/llvm/Assembly/CachedWriter.h
index 7996982de4..af1b246fa6 100644
--- a/include/llvm/Assembly/CachedWriter.h
+++ b/include/llvm/Assembly/CachedWriter.h
@@ -62,12 +62,16 @@ public:
inline CachedWriter &operator<<(const PointerType *X) {
return *this << (const Value*)X;
}
-};
-template<class X>
-inline CachedWriter &operator<<(CachedWriter &CW, const X &v) {
- CW.Out << v;
- return CW;
-}
+ inline CachedWriter &operator<<(ostream &(&Manip)(ostream &)) {
+ Out << Manip; return *this;
+ }
+
+ template<class X>
+ inline CachedWriter &operator<<(const X &v) {
+ Out << v;
+ return *this;
+ }
+};
#endif