]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/include/lld/Config/Version.h
Merge ^/head r307383 through r307735.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / include / lld / Config / Version.h
1 //===- lld/Config/Version.h - LLD 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 /// \brief Defines version macros and version-related utility functions
12 /// for lld.
13 ///
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLD_VERSION_H
17 #define LLD_VERSION_H
18
19 #include "lld/Config/Version.inc"
20 #include "llvm/ADT/StringRef.h"
21 #include <string>
22
23 /// \brief Helper macro for LLD_VERSION_STRING.
24 #define LLD_MAKE_VERSION_STRING2(X) #X
25
26 /// \brief Helper macro for LLD_VERSION_STRING.
27 #define LLD_MAKE_VERSION_STRING(X, Y) LLD_MAKE_VERSION_STRING2(X.Y)
28
29 /// \brief A string that describes the lld version number, e.g., "1.0".
30 #define LLD_VERSION_STRING                                                     \
31   LLD_MAKE_VERSION_STRING(LLD_VERSION_MAJOR, LLD_VERSION_MINOR)
32
33 namespace lld {
34 /// \brief Retrieves the repository path (e.g., Subversion path) that
35 /// identifies the particular lld branch, tag, or trunk from which this
36 /// lld was built.
37 llvm::StringRef getLLDRepositoryPath();
38
39 /// \brief Retrieves the repository revision number (or identifer) from which
40 /// this lld was built.
41 llvm::StringRef getLLDRevision();
42
43 /// \brief Retrieves the full repository version that is an amalgamation of
44 /// the information in getLLDRepositoryPath() and getLLDRevision().
45 std::string getLLDRepositoryVersion();
46
47 /// \brief Retrieves a string representing the complete lld version.
48 llvm::StringRef getLLDVersion();
49 }
50
51 #endif // LLD_VERSION_H