[lld] [LLD][COFF][NFC] Store live flag in ImportThunkChunk. (PR #108459)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 01:07:47 PDT 2024


================
@@ -125,7 +125,7 @@ static void getSymbols(const COFFLinkerContext &ctx,
     if (!file->thunkSym)
       continue;
 
-    if (!file->thunkLive)
+    if (!file->thunkSym->isLive())
----------------
mstorsjo wrote:

This bit had me a bit surprised here, when reading the context of the code below: Do I understand the existing logic here, that if we only access `__imp_foo` but not `foo`, we don't emit either of them into the map file, but if we access `foo`, we emit both into the map file?

(Although if GC isn't enabled, then all chunks are considered live, and they're emitted into the map file anyway.)

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


More information about the llvm-commits mailing list