aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-01-27 21:09:38 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-01-27 21:09:38 +0000
commitc2f1760e15d4e9e7a9eeadc99e8575fa1b2f7389 (patch)
treeb646e20175dffc59ba9b687329d731f1aaaa8467
parent790462cc37eb4ee9424408ca56a74bca9b3ef693 (diff)
downloadsrc-c2f1760e15d4e9e7a9eeadc99e8575fa1b2f7389.tar.gz
src-c2f1760e15d4e9e7a9eeadc99e8575fa1b2f7389.zip
Vendor import of clang release_38 branch r258968:vendor/clang/clang-release_38-r258968
Notes
Notes: svn path=/vendor/clang/dist/; revision=294940 svn path=/vendor/clang/clang-release_38-r258968/; revision=294941; tag=vendor/clang/clang-release_38-r258968
-rw-r--r--tools/driver/driver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index ea218d5403d8..de14425d3616 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -290,9 +290,9 @@ static void SetInstallDir(SmallVectorImpl<const char *> &argv,
if (CanonicalPrefixes)
llvm::sys::fs::make_absolute(InstalledPath);
- InstalledPath = llvm::sys::path::parent_path(InstalledPath);
- if (llvm::sys::fs::exists(InstalledPath.c_str()))
- TheDriver.setInstalledDir(InstalledPath);
+ StringRef InstalledPathParent(llvm::sys::path::parent_path(InstalledPath));
+ if (llvm::sys::fs::exists(InstalledPathParent))
+ TheDriver.setInstalledDir(InstalledPathParent);
}
static int ExecuteCC1Tool(ArrayRef<const char *> argv, StringRef Tool) {