annotate lld/Common/Version.cpp @ 240:ca573705d418

merge
author matac
date Fri, 28 Jul 2023 20:50:09 +0900
parents c4bab56944e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 //===- lib/Common/Version.cpp - LLD Version Number ---------------*- C++-=====//
anatofuz
parents:
diff changeset
2 //
anatofuz
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
6 //
anatofuz
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
8 //
anatofuz
parents:
diff changeset
9 // This file defines several version-related utility functions for LLD.
anatofuz
parents:
diff changeset
10 //
anatofuz
parents:
diff changeset
11 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 #include "lld/Common/Version.h"
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 #include "VCSVersion.inc"
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 // Returns a version string, e.g.:
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
18 // LLD 14.0.0 (https://github.com/llvm/llvm-project.git
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
19 // 2d9759c7902c5cbc9a7e3ab623321d5578d51687)
150
anatofuz
parents:
diff changeset
20 std::string lld::getLLDVersion() {
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
21 #ifdef LLD_VENDOR
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
22 #define LLD_VENDOR_DISPLAY LLD_VENDOR " "
150
anatofuz
parents:
diff changeset
23 #else
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
24 #define LLD_VENDOR_DISPLAY
150
anatofuz
parents:
diff changeset
25 #endif
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
26 return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
27 #undef LLD_VENDOR_DISPLAY
150
anatofuz
parents:
diff changeset
28 }