summaryrefslogtreecommitdiff
path: root/include/llvm/Support/raw_ostream.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-26 21:42:04 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-26 21:42:04 +0000
commit9c27886dd5d504f2b03c6fcb57aba23e5e44c4fa (patch)
treebbfa23593e4dd812821dd2d3a181133910ff7ad9 /include/llvm/Support/raw_ostream.h
parent4699934647c35a308deb33d9d5e4e811b78139ef (diff)
downloadllvm-9c27886dd5d504f2b03c6fcb57aba23e5e44c4fa.tar.gz
llvm-9c27886dd5d504f2b03c6fcb57aba23e5e44c4fa.tar.bz2
llvm-9c27886dd5d504f2b03c6fcb57aba23e5e44c4fa.tar.xz
Add method raw_fd_ostream::seek() for random access within a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/raw_ostream.h')
-rw-r--r--include/llvm/Support/raw_ostream.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index 1a4f6bf6f4..030412169d 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -181,7 +181,11 @@ public:
/// tell - Return the current offset with the file.
uint64_t tell() {
return pos + (OutBufCur - OutBufStart);
- }
+ }
+
+ /// seek - Flushes the stream and repositions the underlying file descriptor
+ /// positition to the offset specified from the beginning of the file.
+ uint64_t seek(uint64_t off);
};
/// raw_stdout_ostream - This is a stream that always prints to stdout.