aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/raw_ostream.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index 2b4b17d7b2..1a4f6bf6f4 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -151,6 +151,7 @@ private:
class raw_fd_ostream : public raw_ostream {
int FD;
bool ShouldClose;
+ uint64_t pos;
public:
/// raw_fd_ostream - Open the specified file for writing. If an
/// error occurs, information about the error is put into ErrorInfo,
@@ -178,7 +179,9 @@ public:
void close();
/// tell - Return the current offset with the file.
- uint64_t tell();
+ uint64_t tell() {
+ return pos + (OutBufCur - OutBufStart);
+ }
};
/// raw_stdout_ostream - This is a stream that always prints to stdout.