Skip to content

Commit c7cd574

Browse files
committed
llvm-version: make it simple versioning
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
1 parent 59476c9 commit c7cd574

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

clang/lib/Basic/Version.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ namespace clang {
2323

2424
std::string getClangRepositoryPath() {
2525
#if defined(CLANG_REPOSITORY_STRING)
26-
return CLANG_REPOSITORY_STRING;
26+
return "";
2727
#else
2828
#ifdef CLANG_REPOSITORY
29-
return CLANG_REPOSITORY;
29+
return "";
3030
#else
3131
return "";
3232
#endif
@@ -35,24 +35,18 @@ std::string getClangRepositoryPath() {
3535

3636
std::string getLLVMRepositoryPath() {
3737
#ifdef LLVM_REPOSITORY
38-
return LLVM_REPOSITORY;
39-
#else
4038
return "";
4139
#endif
4240
}
4341

4442
std::string getClangRevision() {
4543
#ifdef CLANG_REVISION
46-
return CLANG_REVISION;
47-
#else
4844
return "";
4945
#endif
5046
}
5147

5248
std::string getLLVMRevision() {
5349
#ifdef LLVM_REVISION
54-
return LLVM_REVISION;
55-
#else
5650
return "";
5751
#endif
5852
}

cmake/Modules/LLVMVersion.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ if(NOT DEFINED LLVM_VERSION_PATCH)
1010
set(LLVM_VERSION_PATCH 0)
1111
endif()
1212
if(NOT DEFINED LLVM_VERSION_SUFFIX)
13-
set(LLVM_VERSION_SUFFIX git)
13+
set(LLVM_VERSION_SUFFIX "")
1414
endif()
1515

lld/Common/Version.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,5 @@
1818
// LLD 14.0.0 (https://github.com/llvm/llvm-project.git
1919
// 2d9759c7902c5cbc9a7e3ab623321d5578d51687)
2020
std::string lld::getLLDVersion() {
21-
#ifdef LLD_VENDOR
22-
#define LLD_VENDOR_DISPLAY LLD_VENDOR " "
23-
#else
24-
#define LLD_VENDOR_DISPLAY
25-
#endif
26-
#if defined(LLVM_REPOSITORY) && defined(LLVM_REVISION)
27-
return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING " (" LLVM_REPOSITORY
28-
" " LLVM_REVISION ")";
29-
#else
30-
return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING;
31-
#endif
32-
#undef LLD_VENDOR_DISPLAY
21+
return "LLD " LLD_VERSION_STRING;
3322
}

0 commit comments

Comments
 (0)