aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-12-09 04:57:19 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-12-09 04:57:19 +0000
commit08ba50926627caa36ce63cea064645c28534b3d7 (patch)
tree7fce70933cfa967ddcf6c399114cb4f623c26094 /llvm/lib/Support/raw_ostream.cpp
parent26186c7e0f6ca9a742a79af99074d5f3794b08e8 (diff)
downloadllvm-08ba50926627caa36ce63cea064645c28534b3d7.zip
llvm-08ba50926627caa36ce63cea064645c28534b3d7.tar.gz
llvm-08ba50926627caa36ce63cea064645c28534b3d7.tar.bz2
Support: Use a 64-bit seek in raw_fd_ostream::seek().
llvm-svn: 289184
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 92c7967..c51f1d3 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;