clang 8.0.0

Version.h
Go to the documentation of this file.
1 //===- Version.h - Clang Version Number -------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// Defines version macros and version-related utility functions
12 /// for Clang.
13 ///
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_CLANG_BASIC_VERSION_H
17 #define LLVM_CLANG_BASIC_VERSION_H
18
19 #include "clang/Basic/Version.inc"
20 #include "llvm/ADT/StringRef.h"
21
22 namespace clang {
23 /// Retrieves the repository path (e.g., Subversion path) that
24 /// identifies the particular Clang branch, tag, or trunk from which this
25 /// Clang was built.
26 std::string getClangRepositoryPath();
27
28 /// Retrieves the repository path from which LLVM was built.
29 ///
30 /// This supports LLVM residing in a separate repository from clang.
31 std::string getLLVMRepositoryPath();
32
33 /// Retrieves the repository revision number (or identifier) from which
34 /// this Clang was built.
35 std::string getClangRevision();
36
37 /// Retrieves the repository revision number (or identifier) from which
38 /// LLVM was built.
39 ///
40 /// If Clang and LLVM are in the same repository, this returns the same
41 /// string as getClangRevision.
42 std::string getLLVMRevision();
43
44 /// Retrieves the full repository version that is an amalgamation of
45 /// the information in getClangRepositoryPath() and getClangRevision().
46 std::string getClangFullRepositoryVersion();
47
48 /// Retrieves a string representing the complete clang version,
49 /// which includes the clang version number, the repository version,
50 /// and the vendor tag.
51 std::string getClangFullVersion();
52
53 /// Like getClangFullVersion(), but with a custom tool name.
54 std::string getClangToolFullVersion(llvm::StringRef ToolName);
55
56 /// Retrieves a string representing the complete clang version suitable
57 /// for use in the CPP __VERSION__ macro, which includes the clang version
58 /// number, the repository version, and the vendor tag.
59 std::string getClangFullCPPVersion();
60 }
61
62 #endif // LLVM_CLANG_BASIC_VERSION_H
clang::getClangFullVersion
std::string getClangFullVersion()
Retrieves a string representing the complete clang version, which includes the clang version number...
Definition: Version.cpp:118
clang::getClangRepositoryPath
std::string getClangRepositoryPath()
Retrieves the repository path (e.g., Subversion path) that identifies the particular Clang branch...
Definition: Version.cpp:27
clang::getLLVMRevision
std::string getLLVMRevision()
Retrieves the repository revision number (or identifier) from which LLVM was built.
Definition: Version.cpp:82
clang::getClangRevision
std::string getClangRevision()
Retrieves the repository revision number (or identifier) from which this Clang was built...
Definition: Version.cpp:74
clang::getLLVMRepositoryPath
std::string getLLVMRepositoryPath()
Retrieves the repository path from which LLVM was built.
Definition: Version.cpp:57
clang::getClangFullRepositoryVersion
std::string getClangFullRepositoryVersion()
Retrieves the full repository version that is an amalgamation of the information in getClangRepositor...
Definition: Version.cpp:90
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::getClangFullCPPVersion
std::string getClangFullCPPVersion()
Retrieves a string representing the complete clang version suitable for use in the CPP VERSION macro...
Definition: Version.cpp:139
clang::getClangToolFullVersion
std::string getClangToolFullVersion(llvm::StringRef ToolName)
Like getClangFullVersion(), but with a custom tool name.