[lld] [ARM][LLD] Fix buildbot failure due to ununsed variable [NFC] (PR #202925)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 03:49:11 PDT 2026


https://github.com/smithp35 created https://github.com/llvm/llvm-project/pull/202925

The variable was used in an assert, have altered the code to use in an a non-assert context.

>From ae8756000b944dbb4c77596f9d0eed72ac60ca2c Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.smith at arm.com>
Date: Wed, 10 Jun 2026 11:43:38 +0100
Subject: [PATCH] [ARM][LLD] Fix buildbot failure due to ununsed variable [NFC]

The variable was used in an assert, have altered the code to use
in an a non-assert context.
---
 lld/ELF/Relocations.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 0338754c9c32f..0d45236e6d11e 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -1801,8 +1801,7 @@ static bool isThunkSectionCompatible(InputSection *source, Thunk &thunk) {
 
   // Thunks in a different Overlay Output Section can't be reused
   // as we can't guarantee that the Overlay will be in memory.
-  return (source->getOutputSection() == targetOS->getOutputSection() ||
-          !targetOS->inOverlay);
+  return (sourceOS == targetOS || !targetOS->inOverlay);
 }
 
 std::pair<Thunk *, bool> ThunkCreator::getThunk(InputSection *isec,



More information about the llvm-commits mailing list