[lld] [LLD] Fix preprocessor condition when getting lld version (PR #98137)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 02:30:00 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lld-macho

Author: Momchil Velikov (momchil-velikov)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/98137.diff


1 Files Affected:

- (modified) lld/Common/Version.cpp (+1-1) 


``````````diff
diff --git a/lld/Common/Version.cpp b/lld/Common/Version.cpp
index 78f7c6b69b505..59183c79f7a3c 100644
--- a/lld/Common/Version.cpp
+++ b/lld/Common/Version.cpp
@@ -23,7 +23,7 @@ std::string lld::getLLDVersion() {
 #else
 #define LLD_VENDOR_DISPLAY
 #endif
-#if defined(LLVM_REPOSITORY) || defined(LLVM_REVISION)
+#if defined(LLVM_REPOSITORY) && defined(LLVM_REVISION)
   return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING " (" LLVM_REPOSITORY
                             " " LLVM_REVISION ")";
 #else

``````````

</details>


https://github.com/llvm/llvm-project/pull/98137


More information about the llvm-commits mailing list