summaryrefslogtreecommitdiff
path: root/clang/tools
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2023-03-23 08:05:15 -0400
committerAaron Ballman <aaron@aaronballman.com>2023-03-23 08:05:58 -0400
commit18d56880a89ad7d58f8543d148facebd079cef19 (patch)
treec6d0ebb9927e17b55bc12af1d434d8c4dba410e4 /clang/tools
parentc2c9de4ae1251a6a9ee7eed6403bbb41a386bbcb (diff)
downloadllvm-18d56880a89ad7d58f8543d148facebd079cef19.tar.gz
Revert "libclang: Pass Clang install directory to driver via argv[0]."
This reverts commit 201fdef40dd6ec193d18d39638454a3c972f1fec. There was an issue found in post-commit by: https://lab.llvm.org/buildbot/#/builders/91/builds/15272
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 2aa12667d37e..30416e46ce17 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -4013,17 +4013,8 @@ enum CXErrorCode clang_parseTranslationUnit2(
struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files,
unsigned options, CXTranslationUnit *out_TU) {
noteBottomOfStack();
-
- if (!CIdx)
- return CXError_InvalidArguments;
-
- SmallString<64> ClangPath(
- static_cast<CIndexer *>(CIdx)->getClangToolchainPath());
- llvm::sys::path::append(ClangPath, "bin");
- llvm::sys::path::append(ClangPath, "clang");
-
SmallVector<const char *, 4> Args;
- Args.push_back(ClangPath.c_str());
+ Args.push_back("clang");
Args.append(command_line_args, command_line_args + num_command_line_args);
return clang_parseTranslationUnit2FullArgv(
CIdx, source_filename, Args.data(), Args.size(), unsaved_files,