[PATCH] D56089: [ELF] A shared object is needed if any of its occurrences is needed

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 26 13:47:54 PST 2018


ruiu added a comment.

This is a tricky case, and arguably the current behavior should be considered correct, although there's no definition of what's right and what's wrong. Could you share the background of this change so that I can understand why you want this?



================
Comment at: ELF/SymbolTable.cpp:97
     F->parseSoName();
-    if (errorCount() || !SoNames.insert(F->SoName).second)
+    auto R = SoNames.try_emplace(F->SoName, F);
+    cast<SharedFile<ELFT>>(R.first->second)->IsNeeded |= F->IsNeeded;
----------------
Please replace `auto` with the actual type.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56089/new/

https://reviews.llvm.org/D56089





More information about the llvm-commits mailing list