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

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 02:29:32 PDT 2024


https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/98137

None

>From 08998b4b7f68eef85bea0ddddab7cb9f1588b345 Mon Sep 17 00:00:00 2001
From: Momchil Velikov <momchil.velikov at arm.com>
Date: Tue, 9 Jul 2024 10:23:57 +0100
Subject: [PATCH] [LLD] Fix preprocessor condition when getting lld version

Change-Id: I8b4adaaea07d349707e6f5d30d3d73fa4fbfbe43
---
 lld/Common/Version.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the llvm-commits mailing list