Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

momchil-velikov
Copy link
Collaborator

No description provided.

Change-Id: I8b4adaaea07d349707e6f5d30d3d73fa4fbfbe43
@llvmbot
Copy link
Member

llvmbot commented Jul 9, 2024

@llvm/pr-subscribers-lld
@llvm/pr-subscribers-lld-wasm
@llvm/pr-subscribers-lld-coff

@llvm/pr-subscribers-lld-macho

Author: Momchil Velikov (momchil-velikov)

Changes

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

1 Files Affected:

  • (modified) lld/Common/Version.cpp (+1-1)
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

Copy link
Member

@mstorsjo mstorsjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(We don't use change-ids in the commit message in this repo though, so perhaps that bit can be omitted.)

@momchil-velikov
Copy link
Collaborator Author

Thanks!

@momchil-velikov momchil-velikov merged commit 313b6c9 into llvm:main Jul 9, 2024
10 of 12 checks passed
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
@momchil-velikov momchil-velikov deleted the lld-version branch November 13, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants