summaryrefslogtreecommitdiff
path: root/include/llvm/Assembly
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-26 18:49:33 +0000
committerChris Lattner <sabre@nondot.org>2001-11-26 18:49:33 +0000
commit1c3d5169be81e5e91d96b96078ad4f698636383b (patch)
tree0375e30acf230c35f21db61c0b0b65bc821ae168 /include/llvm/Assembly
parent7a8738c844c3dc75c10ed6526244cb89cd8069df (diff)
downloadllvm-1c3d5169be81e5e91d96b96078ad4f698636383b.tar.gz
llvm-1c3d5169be81e5e91d96b96078ad4f698636383b.tar.bz2
llvm-1c3d5169be81e5e91d96b96078ad4f698636383b.tar.xz
Allow output of manipulators for GCC 2.96 compatibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly')
-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