aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CIndexer.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2010-10-12 01:01:43 +0000
committerFrancois Pichet <pichet2000@gmail.com>2010-10-12 01:01:43 +0000
commitc44fe4bf2962bfcb323e93a63ba4a72d67839cde (patch)
treee382c9ed0f38ad6ad88cdf182f40f1cecb64dc5f /tools/libclang/CIndexer.cpp
parent4cd912aa94656697a44c3ebb159f05060300524e (diff)
This patch remove the Win32 XFAIL from remap-complete.c
The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndexer.cpp')
-rw-r--r--tools/libclang/CIndexer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libclang/CIndexer.cpp b/tools/libclang/CIndexer.cpp
index b328d5cd22..baaeab3d0d 100644
--- a/tools/libclang/CIndexer.cpp
+++ b/tools/libclang/CIndexer.cpp
@@ -107,7 +107,8 @@ bool clang::RemapFiles(unsigned num_unsaved_files,
return true;
std::string ErrorInfo;
- llvm::raw_fd_ostream OS(SavedFile.c_str(), ErrorInfo);
+ llvm::raw_fd_ostream OS(SavedFile.c_str(), ErrorInfo,
+ llvm::raw_fd_ostream::F_Binary);
if (!ErrorInfo.empty())
return true;