summaryrefslogtreecommitdiffstats
path: root/clangd/xpc
diff options
context:
space:
mode:
Diffstat (limited to 'clangd/xpc')
-rw-r--r--clangd/xpc/CMakeLists.txt4
-rw-r--r--clangd/xpc/Conversion.cpp7
-rw-r--r--clangd/xpc/Conversion.h7
-rw-r--r--clangd/xpc/XPCTransport.cpp7
-rw-r--r--clangd/xpc/framework/CMakeLists.txt3
-rw-r--r--clangd/xpc/framework/ClangdXPC.cpp7
-rw-r--r--clangd/xpc/test-client/ClangdXPCTestClient.cpp12
7 files changed, 31 insertions, 16 deletions
diff --git a/clangd/xpc/CMakeLists.txt b/clangd/xpc/CMakeLists.txt
index 788a66f5..f05767c8 100644
--- a/clangd/xpc/CMakeLists.txt
+++ b/clangd/xpc/CMakeLists.txt
@@ -20,10 +20,10 @@ set(LLVM_OPTIONAL_SOURCES Conversion.cpp XPCTransport.cpp)
add_clang_library(clangdXpcJsonConversions
Conversion.cpp
+ LINK_LIBS clangDaemon
)
add_clang_library(clangdXpcTransport
XPCTransport.cpp
- DEPENDS clangdXpcJsonConversions
- LINK_LIBS clangdXpcJsonConversions
+ LINK_LIBS clangDaemon clangdXpcJsonConversions
)
diff --git a/clangd/xpc/Conversion.cpp b/clangd/xpc/Conversion.cpp
index 45bb11af..3e8d36b7 100644
--- a/clangd/xpc/Conversion.cpp
+++ b/clangd/xpc/Conversion.cpp
@@ -1,9 +1,8 @@
//===--- Conversion.cpp - LSP data (de-)serialization through XPC - C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clangd/xpc/Conversion.h b/clangd/xpc/Conversion.h
index 936f51be..fccc095b 100644
--- a/clangd/xpc/Conversion.h
+++ b/clangd/xpc/Conversion.h
@@ -1,9 +1,8 @@
//===--- Conversion.h - LSP data (de-)serialization through XPC -*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clangd/xpc/XPCTransport.cpp b/clangd/xpc/XPCTransport.cpp
index 496d8e47..f7df8a91 100644
--- a/clangd/xpc/XPCTransport.cpp
+++ b/clangd/xpc/XPCTransport.cpp
@@ -1,9 +1,8 @@
//===--- XPCTransport.cpp - sending and receiving LSP messages over XPC ---===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "Conversion.h"
diff --git a/clangd/xpc/framework/CMakeLists.txt b/clangd/xpc/framework/CMakeLists.txt
index a20340fb..7e1ce876 100644
--- a/clangd/xpc/framework/CMakeLists.txt
+++ b/clangd/xpc/framework/CMakeLists.txt
@@ -1,6 +1,7 @@
set(SOURCES
- ClangdXPC.cpp)
+ ClangdXPC.cpp
+)
add_clang_library(ClangdXPCLib SHARED
${SOURCES}
DEPENDS
diff --git a/clangd/xpc/framework/ClangdXPC.cpp b/clangd/xpc/framework/ClangdXPC.cpp
index 6c68f5cd..3b86164e 100644
--- a/clangd/xpc/framework/ClangdXPC.cpp
+++ b/clangd/xpc/framework/ClangdXPC.cpp
@@ -1,3 +1,10 @@
+//===-- ClangdXPC.cpp --------------------------------------------*- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
/// Returns the bundle identifier of the Clangd XPC service.
extern "C" const char *clangd_xpc_get_bundle_identifier() {
diff --git a/clangd/xpc/test-client/ClangdXPCTestClient.cpp b/clangd/xpc/test-client/ClangdXPCTestClient.cpp
index da204a69..1cddd06d 100644
--- a/clangd/xpc/test-client/ClangdXPCTestClient.cpp
+++ b/clangd/xpc/test-client/ClangdXPCTestClient.cpp
@@ -1,3 +1,11 @@
+//===-- ClangdXPCTestClient.cpp ----------------------------------*- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
#include "xpc/Conversion.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/SmallString.h"
@@ -41,8 +49,10 @@ int main(int argc, char *argv[]) {
// Open the ClangdXPC dylib in the framework.
std::string LibPath = getLibraryPath();
void *dlHandle = dlopen(LibPath.c_str(), RTLD_LOCAL | RTLD_FIRST);
- if (!dlHandle)
+ if (!dlHandle) {
+ llvm::errs() << "Failed to load framework from \'" << LibPath << "\'\n";
return 1;
+ }
// Lookup the XPC service bundle name, and launch it.
clangd_xpc_get_bundle_identifier_t clangd_xpc_get_bundle_identifier =