[cfe-commits] r86896 - /cfe/trunk/tools/CIndex/CIndex.cpp
John Thompson
John.Thompson.JTSoftware at gmail.com
Wed Nov 11 15:11:14 PST 2009
Author: jtsoftware
Date: Wed Nov 11 17:11:14 2009
New Revision: 86896
URL: http://llvm.org/viewvc/llvm-project?rev=86896&view=rev
Log:
Fix clang executable path for Windows
Modified:
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=86896&r1=86895&r2=86896&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Wed Nov 11 17:11:14 2009
@@ -331,6 +331,11 @@
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 @@
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;
More information about the cfe-commits
mailing list