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

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 9 04:07:31 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lld

Author: Andrew Ng (nga888)

<details>
<summary>Changes</summary>

On the "main" branch, Symbol no longer has the `used` member. Therefore, when PR #<!-- -->198129 (commit 905a88b9) was cherry picked to the "release/22.x" branch, the initialization of `used` was lost.

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


1 Files Affected:

- (modified) lld/ELF/Symbols.h (+5-5) 


``````````diff
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 {

``````````

</details>


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


More information about the llvm-branch-commits mailing list