File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tools/SourceKit/tools/sourcekitd/bin/InProc Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1515#include " SourceKit/Support/Concurrency.h"
1616#include " SourceKit/Support/UIdent.h"
1717
18+ #include " llvm/ADT/SmallString.h"
1819#include " llvm/Support/Mutex.h"
1920#include " llvm/Support/Path.h"
2021
@@ -82,14 +83,17 @@ UIdent sourcekitd::UIdentFromSKDUID(sourcekitd_uid_t uid) {
8283std::string sourcekitd::getRuntimeLibPath () {
8384#if defined(_WIN32)
8485 MEMORY_BASIC_INFORMATION mbi;
86+ llvm::SmallString<128 > libPath;
8587 char path[MAX_PATH + 1 ];
8688 if (!VirtualQuery (static_cast <void *>(sourcekitd_initialize), &mbi,
8789 sizeof (mbi)))
8890 llvm_unreachable (" call to VirtualQuery failed" );
8991 if (!GetModuleFileNameA (static_cast <HINSTANCE>(mbi.AllocationBase ), path,
9092 MAX_PATH))
9193 llvm_unreachable (" call to GetModuleFileNameA failed" );
92- return llvm::sys::path::parent_path (path);
94+ libPath = llvm::sys::path::parent_path (llvm::sys::path::parent_path (path));
95+ llvm::sys::path::append (libPath, " lib" );
96+ return libPath.str ();
9397#else
9498 // This silly cast below avoids a C++ warning.
9599 Dl_info info;
You can’t perform that action at this time.
0 commit comments