[llvm-branch-commits] [lld] [LLD][ELF] Add missing initialization of Symbol `used` member. (PR #202578)

Andrew Ng via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 9 09:21:59 PDT 2026


https://github.com/nga888 updated https://github.com/llvm/llvm-project/pull/202578

>From 804ab24af8a0f660fe8e01c620ac9f74bba93a2c Mon Sep 17 00:00:00 2001
From: Andrew Ng <andrew.ng at sony.com>
Date: Tue, 9 Jun 2026 11:55:05 +0100
Subject: [PATCH] [LLD][ELF] Add missing initialization of Symbol `used`
 member.

On the "main" branch, Symbol no longer has the `used` member which was
moved in PR #190117 (commit 6a874161). Therefore, when the cherry pick
from PR #198129 (commit 905a88b9) was merged to the "release/22.x"
branch, the initialization of `used` was lost.
---
 lld/ELF/Symbols.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 23994ccea1ef0..26d28825558c9 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -243,11 +243,11 @@ class Symbol {
          uint8_t stOther, uint8_t type)
       : file(file), nameData(name.data()), nameSize(name.size()), type(type),
         binding(binding), stOther(stOther), symbolKind(k), isPreemptible(false),
-        isUsedInRegularObj(false), isExported(false), ltoCanOmit(false),
-        traced(false), hasVersionSuffix(false), isInIplt(false),
-        gotInIgot(false), folded(false), archSpecificBit(false),
-        scriptDefined(false), dsoDefined(false), dsoProtected(false),
-        versionScriptAssigned(false), thunkAccessed(false),
+        isUsedInRegularObj(false), used(false), isExported(false),
+        ltoCanOmit(false), traced(false), hasVersionSuffix(false),
+        isInIplt(false), gotInIgot(false), folded(false),
+        archSpecificBit(false), scriptDefined(false), dsoDefined(false),
+        dsoProtected(false), versionScriptAssigned(false), thunkAccessed(false),
         inDynamicList(false), referenced(false), referencedAfterWrap(false) {}
 
   void overwrite(Symbol &sym, Kind k) const {



More information about the llvm-branch-commits mailing list