Skip to content

Commit

Permalink
llvm-version: make it simple versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
  • Loading branch information
kutemeikito committed Aug 3, 2024
1 parent 59476c9 commit c7cd574
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
10 changes: 2 additions & 8 deletions clang/lib/Basic/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ namespace clang {

std::string getClangRepositoryPath() {
#if defined(CLANG_REPOSITORY_STRING)
return CLANG_REPOSITORY_STRING;
return "";
#else
#ifdef CLANG_REPOSITORY
return CLANG_REPOSITORY;
return "";
#else
return "";
#endif
Expand All @@ -35,24 +35,18 @@ std::string getClangRepositoryPath() {

std::string getLLVMRepositoryPath() {
#ifdef LLVM_REPOSITORY
return LLVM_REPOSITORY;
#else
return "";
#endif
}

std::string getClangRevision() {
#ifdef CLANG_REVISION
return CLANG_REVISION;
#else
return "";
#endif
}

std::string getLLVMRevision() {
#ifdef LLVM_REVISION
return LLVM_REVISION;
#else
return "";
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/LLVMVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 0)
endif()
if(NOT DEFINED LLVM_VERSION_SUFFIX)
set(LLVM_VERSION_SUFFIX git)
set(LLVM_VERSION_SUFFIX "")
endif()

13 changes: 1 addition & 12 deletions lld/Common/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,5 @@
// LLD 14.0.0 (https://github.com/llvm/llvm-project.git
// 2d9759c7902c5cbc9a7e3ab623321d5578d51687)
std::string lld::getLLDVersion() {
#ifdef LLD_VENDOR
#define LLD_VENDOR_DISPLAY LLD_VENDOR " "
#else
#define LLD_VENDOR_DISPLAY
#endif
#if defined(LLVM_REPOSITORY) && defined(LLVM_REVISION)
return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING " (" LLVM_REPOSITORY
" " LLVM_REVISION ")";
#else
return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING;
#endif
#undef LLD_VENDOR_DISPLAY
return "LLD " LLD_VERSION_STRING;
}

0 comments on commit c7cd574

Please sign in to comment.