[PATCH] D102431: [clangd][QueryDriver] Dont check for existence of driver
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 17 03:43:29 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGec2f7376e39f: [clangd][QueryDriver] Dont check for existence of driver (authored by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102431/new/
https://reviews.llvm.org/D102431
Files:
clang-tools-extra/clangd/QueryDriverDatabase.cpp
Index: clang-tools-extra/clangd/QueryDriverDatabase.cpp
===================================================================
--- clang-tools-extra/clangd/QueryDriverDatabase.cpp
+++ clang-tools-extra/clangd/QueryDriverDatabase.cpp
@@ -164,15 +164,6 @@
return llvm::None;
}
- if (!llvm::sys::fs::exists(Driver)) {
- elog("System include extraction: {0} does not exist.", Driver);
- return llvm::None;
- }
- if (!llvm::sys::fs::can_execute(Driver)) {
- elog("System include extraction: {0} is not executable.", Driver);
- return llvm::None;
- }
-
llvm::SmallString<128> StdErrPath;
if (auto EC = llvm::sys::fs::createTemporaryFile("system-includes", "clangd",
StdErrPath)) {
@@ -219,11 +210,13 @@
}
}
+ std::string ErrMsg;
if (int RC = llvm::sys::ExecuteAndWait(Driver, Args, /*Env=*/llvm::None,
- Redirects)) {
+ Redirects, /*SecondsToWait=*/0,
+ /*MemoryLimit=*/0, &ErrMsg)) {
elog("System include extraction: driver execution failed with return code: "
- "{0}. Args: [{1}]",
- llvm::to_string(RC), printArgv(Args));
+ "{0} - '{1}'. Args: [{2}]",
+ llvm::to_string(RC), ErrMsg, printArgv(Args));
return llvm::None;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102431.345816.patch
Type: text/x-patch
Size: 1381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210517/48683f8d/attachment.bin>
More information about the cfe-commits
mailing list