[llvm] [gold] Handle duplicate archives gracefully in LTO plugin (PR #190934)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 09:30:55 PDT 2026


================
@@ -1083,8 +1083,15 @@ static std::vector<std::pair<SmallString<128>, bool>> runLTO() {
     std::string Identifier =
         getThinLTOObjectFileName(F.name, OldSuffix, NewSuffix);
     auto ObjFilename = ObjectToIndexFileState.insert({Identifier, false});
-    assert(ObjFilename.second);
-    if (const void *View = getSymbolsAndView(F))
+    // get_symbols must be called for every claimed file; skipping it causes
+    // gold to crash when processing the file handle during linking.
----------------
topperc wrote:

Does 'gold' here refer to the linker or the plugin itself?

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


More information about the llvm-commits mailing list