add a write method.

llvm-svn: 59595
This commit is contained in:
Chris Lattner 2008-11-19 06:45:06 +00:00
parent 797dcb3ef7
commit e111ce1265

View File

@ -64,6 +64,12 @@ namespace llvm {
return *this;
}
template <typename Ty>
BaseStream &write(const Ty &A, unsigned N) {
if (Stream) Stream->write(A, N);
return *this;
}
operator StreamTy* () { return Stream; }
bool operator == (const StreamTy &S) { return &S == Stream; }