| //===--- Feature.cpp - Compile-time configuration ------------------------===// |
| // 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 "clang/Basic/Version.h" |
| #include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX |
| #include "llvm/Support/Compiler.h" |
| #include "llvm/TargetParser/Host.h" |
| std::string versionString() { return clang::getClangToolFullVersion("clangd"); } |
| std::string platformString() { |
| static std::string PlatformString = []() { |
| std::string Host = llvm::sys::getProcessTriple(); |
| std::string Target = llvm::sys::getDefaultTargetTriple(); |
| std::string featureString() { |
| #elif defined(LLVM_ON_UNIX) |
| #if LLVM_ADDRESS_SANITIZER_BUILD |
| #if LLVM_THREAD_SANITIZER_BUILD |
| #if LLVM_MEMORY_SANITIZER_BUILD |
| #if !CLANGD_DECISION_FOREST |