1*4ad9ec8aSSam McCall //===--- Feature.h - Compile-time configuration ------------------*-C++-*-===// 2*4ad9ec8aSSam McCall // 3*4ad9ec8aSSam McCall // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*4ad9ec8aSSam McCall // See https://llvm.org/LICENSE.txt for license information. 5*4ad9ec8aSSam McCall // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*4ad9ec8aSSam McCall // 7*4ad9ec8aSSam McCall //===----------------------------------------------------------------------===// 8*4ad9ec8aSSam McCall // This file is not named "Features.h" because of a conflict with libstdc++: 9*4ad9ec8aSSam McCall // https://github.com/clangd/clangd/issues/835 10*4ad9ec8aSSam McCall //===----------------------------------------------------------------------===// 11*4ad9ec8aSSam McCall 12*4ad9ec8aSSam McCall #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURE_H 13*4ad9ec8aSSam McCall #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURE_H 14*4ad9ec8aSSam McCall #include <string> 15*4ad9ec8aSSam McCall 16*4ad9ec8aSSam McCall // Export constants like CLANGD_BUILD_XPC 17*4ad9ec8aSSam McCall #include "Features.inc" 18*4ad9ec8aSSam McCall 19*4ad9ec8aSSam McCall namespace clang { 20*4ad9ec8aSSam McCall namespace clangd { 21*4ad9ec8aSSam McCall 22*4ad9ec8aSSam McCall // Returns a version string for clangd, e.g. "clangd 10.0.0" 23*4ad9ec8aSSam McCall std::string versionString(); 24*4ad9ec8aSSam McCall 25*4ad9ec8aSSam McCall // Returns the platform triple for clangd, e.g. "x86_64-pc-linux-gnu" 26*4ad9ec8aSSam McCall // May include both the host and target triple if they differ. 27*4ad9ec8aSSam McCall std::string platformString(); 28*4ad9ec8aSSam McCall 29*4ad9ec8aSSam McCall // Returns a string describing the compile-time configuration. 30*4ad9ec8aSSam McCall // e.g. mac+debug+asan+grpc 31*4ad9ec8aSSam McCall std::string featureString(); 32*4ad9ec8aSSam McCall 33*4ad9ec8aSSam McCall } // namespace clangd 34*4ad9ec8aSSam McCall } // namespace clang 35*4ad9ec8aSSam McCall 36*4ad9ec8aSSam McCall #endif 37