1 //===- lld/Config/Version.h - LLD Version Number ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief Defines version macros and version-related utility functions
14 //===----------------------------------------------------------------------===//
19 #include "lld/Config/Version.inc"
20 #include "llvm/ADT/StringRef.h"
23 /// \brief Helper macro for LLD_VERSION_STRING.
24 #define LLD_MAKE_VERSION_STRING2(X) #X
26 /// \brief Helper macro for LLD_VERSION_STRING.
27 #define LLD_MAKE_VERSION_STRING(X, Y) LLD_MAKE_VERSION_STRING2(X.Y)
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)
34 /// \brief Retrieves the repository path (e.g., Subversion path) that
35 /// identifies the particular lld branch, tag, or trunk from which this
37 llvm::StringRef getLLDRepositoryPath();
39 /// \brief Retrieves the repository revision number (or identifer) from which
40 /// this lld was built.
41 llvm::StringRef getLLDRevision();
43 /// \brief Retrieves the full repository version that is an amalgamation of
44 /// the information in getLLDRepositoryPath() and getLLDRevision().
45 std::string getLLDRepositoryVersion();
47 /// \brief Retrieves a string representing the complete lld version.
48 llvm::StringRef getLLDVersion();
51 #endif // LLD_VERSION_H