[clangd] Set stdin to binary to fix tests on windows.

llvm-svn: 294297
This commit is contained in:
Benjamin Kramer 2017-02-07 12:40:59 +00:00
parent d48b23c2f2
commit 6a3d74eb50
1 changed files with 4 additions and 0 deletions

View File

@ -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;