[PATCH] D71661: I broke clangd
Mikhail Goncharov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 18 06:37:44 PST 2019
goncharov created this revision.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
goncharov removed subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71661
Files:
clang-tools-extra/clangd/CompileCommands.cpp
Index: clang-tools-extra/clangd/CompileCommands.cpp
===================================================================
--- clang-tools-extra/clangd/CompileCommands.cpp
+++ clang-tools-extra/clangd/CompileCommands.cpp
@@ -7,13 +7,13 @@
//===----------------------------------------------------------------------===//
#include "CompileCommands.h"
-#include "Logger.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
+#include "Logger.h"
#include "llvm/Support/Program.h"
namespace clang {
@@ -34,9 +34,7 @@
llvm::Optional<llvm::StringRef> Redirects[3] = {
/*stdin=*/{""}, /*stdout=*/{OutFile}, /*stderr=*/{""}};
vlog("Invoking {0} to find clang installation", *Xcrun);
- int Ret = llvm::sys::ExecuteAndWait(*Xcrun, Argv,
- /*Env=*/llvm::None, Redirects,
- /*SecondsToWait=*/10);
+ int Ret = llvm::sys::ExecuteAndWait(*Xcrun, Argv, /*Env=*/llvm::None, Redirects, /*SecondsToWait=*/10);
if (Ret != 0) {
log("xcrun exists but failed with code {0}. "
"If you have a non-apple toolchain, this is OK. "
@@ -84,7 +82,7 @@
// because cc1 (not the driver!) will find libc++ relative to argv[0].
#ifdef __APPLE__
if (auto MacClang = queryXcrun({"xcrun", "--find", "clang"}))
- return resolve(std::move(*MacClang));
+ return resolve(std::move(*McCree));
#endif
// On other platforms, just look for compilers on the PATH.
for (const char *Name : {"clang", "gcc", "cc"})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71661.234531.patch
Type: text/x-patch
Size: 1689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191218/097610d5/attachment.bin>
More information about the cfe-commits
mailing list