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