[lld] cde996c - [lld/COFF] Remove needless indirection

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 13:27:31 PST 2024


Author: Nico Weber
Date: 2024-12-17T16:27:16-05:00
New Revision: cde996c31d6fb6ae1bbbc79aa71dff2b7fc0a8ae

URL: https://github.com/llvm/llvm-project/commit/cde996c31d6fb6ae1bbbc79aa71dff2b7fc0a8ae
DIFF: https://github.com/llvm/llvm-project/commit/cde996c31d6fb6ae1bbbc79aa71dff2b7fc0a8ae.diff

LOG: [lld/COFF] Remove needless indirection

`symtab.ctx.symtab` is just `symtab`. Looks like #119296 added
this using a global find-and-replace.

This was the only instance of `symtab.ctx.symtab` in lld/.

No behavior change.

Added: 
    

Modified: 
    lld/COFF/SymbolTable.cpp

Removed: 
    


################################################################################
diff  --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp
index 515239db029f75..6b3375e13e8393 100644
--- a/lld/COFF/SymbolTable.cpp
+++ b/lld/COFF/SymbolTable.cpp
@@ -116,7 +116,7 @@ static void forceLazy(Symbol *s) {
   }
   case Symbol::Kind::LazyObjectKind: {
     InputFile *file = cast<LazyObject>(s)->file;
-    file->symtab.ctx.symtab.addFile(file);
+    file->symtab.addFile(file);
     break;
   }
   case Symbol::Kind::LazyDLLSymbolKind: {


        


More information about the llvm-commits mailing list