aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-14 18:46:27 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-14 18:46:27 +0000
commitb9a822639c570b1853c75c235e9d6bad485f9e01 (patch)
tree08bcad5194f74a6ccb66aa780cd6dde991e6058d /lib/Driver/Driver.cpp
parent4a7e88978cf646ad10d654020cb00b3877069210 (diff)
Driver: When re'execing clang, use path to the main executable instead of
looking up Clang in the normal search paths (which may end up finding the wrong clang). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 5da7908434..2fc0a5354d 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -75,6 +75,11 @@ Driver::Driver(llvm::StringRef _Name, llvm::StringRef _Dir,
P.appendComponent("clang");
P.appendComponent(CLANG_VERSION_STRING);
ResourceDir = P.str();
+
+ // Save the original clang executable path.
+ P = Dir;
+ P.appendComponent(Name);
+ ClangExecutable = P.str();
}
Driver::~Driver() {