Fix lto AddStream callsite in gold plugin.
authorZequan Wu <zequanwu@google.com>
Tue, 22 Nov 2022 23:46:49 +0000 (15:46 -0800)
committerZequan Wu <zequanwu@google.com>
Tue, 22 Nov 2022 23:46:59 +0000 (15:46 -0800)
llvm/tools/gold/gold-plugin.cpp

index f7eb7fa..c103fc4 100644 (file)
@@ -1103,7 +1103,7 @@ static std::vector<std::pair<SmallString<128>, bool>> runLTO() {
 
   auto AddBuffer = [&](size_t Task, const Twine &moduleName,
                        std::unique_ptr<MemoryBuffer> MB) {
-    *AddStream(Task)->OS << MB->getBuffer();
+    *AddStream(Task, moduleName)->OS << MB->getBuffer();
   };
 
   FileCache Cache;