15 #include "clang/Config/config.h"
16 #include "llvm/Support/raw_ostream.h"
20 #include "VCSVersion.inc"
25 #if defined(CLANG_REPOSITORY_STRING)
26 return CLANG_REPOSITORY_STRING;
28 #ifdef CLANG_REPOSITORY
29 return CLANG_REPOSITORY;
37 #ifdef LLVM_REPOSITORY
38 return LLVM_REPOSITORY;
46 return CLANG_REVISION;
70 llvm::raw_string_ostream OS(buf);
73 if (!
Path.empty() || !Revision.empty()) {
77 if (!Revision.empty()) {
86 if (!LLVMRev.empty() && LLVMRev != Revision) {
89 if (!LLVMRepo.empty())
90 OS << LLVMRepo <<
' ';
102 llvm::raw_string_ostream OS(buf);
103 OS <<
getClangVendor() << ToolName <<
" version " CLANG_VERSION_STRING;
117 llvm::raw_string_ostream OS(buf);
131 return {{
"SYCL_LANGUAGE_VERSION",
"202001"}};
132 llvm_unreachable(
"SYCL standard should be set");
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines version macros and version-related utility functions for Clang.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
The JSON file list parser is used to communicate input to InstallAPI.
std::string getLLVMRevision()
Retrieves the repository revision number (or identifier) from which LLVM was built.
std::string getClangVendor()
Retrieves the Clang vendor tag.
std::string getClangToolFullVersion(llvm::StringRef ToolName)
Like getClangFullVersion(), but with a custom tool name.
llvm::SmallVector< std::pair< llvm::StringRef, llvm::StringRef >, 2 > getSYCLVersionMacros(const LangOptions &LangOpts)
Retrieves a string representing the SYCL standard version for use in the CL_SYCL_LANGUAGE_VERSION and...
std::string getClangRevision()
Retrieves the repository revision number (or identifier) from which this Clang was built.
std::string getClangRepositoryPath()
Retrieves the repository path (e.g., Subversion path) that identifies the particular Clang branch,...
std::string getLLVMRepositoryPath()
Retrieves the repository path from which LLVM was built.
std::string getClangFullRepositoryVersion()
Retrieves the full repository version that is an amalgamation of the information in getClangRepositor...
std::string getClangFullCPPVersion()
Retrieves a string representing the complete clang version suitable for use in the CPP VERSION macro,...
std::string getClangFullVersion()
Retrieves a string representing the complete clang version, which includes the clang version number,...