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"})
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"})
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits