Revert r315214 since diff -Z isn't portable, this is breaking:
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA
llvm-svn: 315242
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index cd7d44b..0634c94 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -9,12 +9,10 @@
#include "ClangdLSPServer.h"
#include "JSONRPCDispatcher.h"
-#include "Path.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
-#include "llvm/Support/raw_ostream.h"
#include <iostream>
#include <memory>
#include <string>
@@ -45,17 +43,11 @@
llvm::cl::desc("Parse on main thread. If set, -j is ignored"),
llvm::cl::init(false), llvm::cl::Hidden);
-static llvm::cl::opt<Path>
+static llvm::cl::opt<std::string>
ResourceDir("resource-dir",
llvm::cl::desc("Directory for system clang headers"),
llvm::cl::init(""), llvm::cl::Hidden);
-static llvm::cl::opt<Path> InputMirrorFile(
- "input-mirror-file",
- llvm::cl::desc(
- "Mirror all LSP input to the specified file. Useful for debugging."),
- llvm::cl::init(""), llvm::cl::Hidden);
-
int main(int argc, char *argv[]) {
llvm::cl::ParseCommandLineOptions(argc, argv, "clangd");
@@ -71,21 +63,9 @@
WorkerThreadsCount = 0;
/// Validate command line arguments.
- llvm::Optional<llvm::raw_fd_ostream> InputMirrorStream;
- if (!InputMirrorFile.empty()) {
- std::error_code EC;
- InputMirrorStream.emplace(InputMirrorFile, /*ref*/ EC, llvm::sys::fs::F_RW);
- if (EC) {
- InputMirrorStream.reset();
- llvm::errs() << "Error while opening an input mirror file: "
- << EC.message();
- }
- }
-
llvm::raw_ostream &Outs = llvm::outs();
llvm::raw_ostream &Logs = llvm::errs();
- JSONOutput Out(Outs, Logs,
- InputMirrorStream ? InputMirrorStream.getPointer() : nullptr);
+ JSONOutput Out(Outs, Logs);
// If --compile-commands-dir arg was invoked, check value and override default
// path.