summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2009-11-11 23:11:14 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2009-11-11 23:11:14 +0000
commit92ebab90fef301cca9d8e4455c41beaa23b5e5d0 (patch)
treefe197d06a9f17ca92adce70c7a86e6e87bc83f85 /clang
parent626d49f684c089a01d6a411e0b431064e09b12af (diff)
downloadbcm5719-llvm-92ebab90fef301cca9d8e4455c41beaa23b5e5d0.tar.gz
bcm5719-llvm-92ebab90fef301cca9d8e4455c41beaa23b5e5d0.zip
Fix clang executable path for Windows
llvm-svn: 86896
Diffstat (limited to 'clang')
-rw-r--r--clang/tools/CIndex/CIndex.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index da73ae40a39..69cb52b4850 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/tools/CIndex/CIndex.cpp
@@ -331,6 +331,11 @@ const llvm::sys::Path& CIndexer::getClangPath() {
GetModuleFileNameA((HINSTANCE)mbi.AllocationBase, path, MAX_PATH);
llvm::sys::Path CIndexPath(path);
+
+ CIndexPath.eraseComponent();
+ CIndexPath.appendComponent("clang");
+ CIndexPath.appendSuffix("exe");
+ CIndexPath.makeAbsolute();
#else
// This silly cast below avoids a C++ warning.
Dl_info info;
@@ -338,13 +343,13 @@ const llvm::sys::Path& CIndexer::getClangPath() {
assert(0 && "Call to dladdr() failed");
llvm::sys::Path CIndexPath(info.dli_fname);
-#endif
// We now have the CIndex directory, locate clang relative to it.
CIndexPath.eraseComponent();
CIndexPath.eraseComponent();
CIndexPath.appendComponent("bin");
CIndexPath.appendComponent("clang");
+#endif
// Cache our result.
ClangPath = CIndexPath;
OpenPOWER on IntegriCloud