[clang-tools-extra] 0eb64fc - Fix clangd-xpc-test-client build after 777180a32b6107

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 28 16:48:39 PST 2020


Author: Nico Weber
Date: 2020-01-28T19:48:31-05:00
New Revision: 0eb64fcb89a5b236962b344cc506873ebbf734de

URL: https://github.com/llvm/llvm-project/commit/0eb64fcb89a5b236962b344cc506873ebbf734de
DIFF: https://github.com/llvm/llvm-project/commit/0eb64fcb89a5b236962b344cc506873ebbf734de.diff

LOG: Fix clangd-xpc-test-client build after 777180a32b6107

Added: 
    

Modified: 
    clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp b/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp
index 1cddd06d1dd8..908544fec5f6 100644
--- a/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp
+++ b/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp
@@ -23,7 +23,7 @@ typedef const char *(*clangd_xpc_get_bundle_identifier_t)(void);
 using namespace llvm;
 using namespace clang;
 
-std::string getLibraryPath() {
+static std::string getLibraryPath() {
   Dl_info info;
   if (dladdr((void *)(uintptr_t)getLibraryPath, &info) == 0)
     llvm_unreachable("Call to dladdr() failed");
@@ -32,7 +32,7 @@ std::string getLibraryPath() {
       llvm::sys::path::parent_path(info.dli_fname));
   llvm::sys::path::append(LibClangPath, "lib", "ClangdXPC.framework",
                           "ClangdXPC");
-  return LibClangPath.str();
+  return std::string(LibClangPath.str());
 }
 
 static void dumpXPCObject(xpc_object_t Object, llvm::raw_ostream &OS) {


        


More information about the cfe-commits mailing list