diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-12-09 04:57:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-12-09 04:57:19 +0000 |
commit | 08ba50926627caa36ce63cea064645c28534b3d7 (patch) | |
tree | 7fce70933cfa967ddcf6c399114cb4f623c26094 | |
parent | 26186c7e0f6ca9a742a79af99074d5f3794b08e8 (diff) | |
download | bcm5719-llvm-08ba50926627caa36ce63cea064645c28534b3d7.tar.gz bcm5719-llvm-08ba50926627caa36ce63cea064645c28534b3d7.zip |
Support: Use a 64-bit seek in raw_fd_ostream::seek().
llvm-svn: 289184
-rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 92c7967cd8f..c51f1d376b0 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -598,7 +598,11 @@ void raw_fd_ostream::close() { uint64_t raw_fd_ostream::seek(uint64_t off) { assert(SupportsSeeking && "Stream does not support seeking!"); flush(); - pos = ::lseek(FD, off, SEEK_SET); +#ifdef LLVM_ON_WIN32 + pos = ::_lseeki64(FD, off, SEEK_SET); +#else + pos = ::lseek64(FD, off, SEEK_SET); +#endif if (pos == (uint64_t)-1) error_detected(); return pos; |