Author: d0k Date: Tue Feb 7 06:40:59 2017 New Revision: 294297 URL: http://llvm.org/viewvc/llvm-project?rev=294297&view=rev Log: [clangd] Set stdin to binary to fix tests on windows.
Modified: clang-tools-extra/trunk/clangd/ClangDMain.cpp Modified: clang-tools-extra/trunk/clangd/ClangDMain.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangDMain.cpp?rev=294297&r1=294296&r2=294297&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/ClangDMain.cpp (original) +++ clang-tools-extra/trunk/clangd/ClangDMain.cpp Tue Feb 7 06:40:59 2017 @@ -11,6 +11,7 @@ #include "JSONRPCDispatcher.h" #include "ProtocolHandlers.h" #include "llvm/Support/FileSystem.h" +#include "llvm/Support/Program.h" #include <iostream> #include <string> using namespace clang::clangd; @@ -19,6 +20,9 @@ int main(int argc, char *argv[]) { llvm::raw_ostream &Outs = llvm::outs(); llvm::raw_ostream &Logs = llvm::errs(); + // Change stdin to binary to not lose \r\n on windows. + llvm::sys::ChangeStdinToBinary(); + // Set up a document store and intialize all the method handlers for JSONRPC // dispatching. DocumentStore Store; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits