1 //===- lib/Common/Version.cpp - LLD Version Number ---------------*- C++-=====//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines several version-related utility functions for LLD.
11 //===----------------------------------------------------------------------===//
13 #include "lld/Common/Version.h"
15 #include "VCSVersion.inc"
17 // Returns a version string, e.g.:
18 // LLD 14.0.0 (https://github.com/llvm/llvm-project.git
19 // 2d9759c7902c5cbc9a7e3ab623321d5578d51687)
20 std::string
lld::getLLDVersion() {
22 #define LLD_VENDOR_DISPLAY LLD_VENDOR " "
24 #define LLD_VENDOR_DISPLAY
26 return LLD_VENDOR_DISPLAY
"LLD " LLD_VERSION_STRING
;
27 #undef LLD_VENDOR_DISPLAY