clang-tools 20.0.0git
Feature.h
Go to the documentation of this file.
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 LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURE_H
14#include <string>
15
16// Export constants like CLANGD_BUILD_XPC
17#include "Features.inc"
18
19namespace clang {
20namespace clangd {
21
22// Returns a version string for clangd, e.g. "clangd 10.0.0"
23std::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.
27std::string platformString();
28
29// Returns a string describing the compile-time configuration.
30// e.g. mac+debug+asan+grpc
31std::string featureString();
32
33} // namespace clangd
34} // namespace clang
35
36#endif
std::string platformString()
Definition: Feature.cpp:19
std::string featureString()
Definition: Feature.cpp:32
std::string versionString()
Definition: Feature.cpp:17
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//