--- llvm-project-rocm-6.4.0/llvm/tools/gold/gold-plugin.cpp 2025-04-02 20:11:11.000000000 +0200 +++ llvm-project-rocm-6.4.0.new/llvm/tools/gold/gold-plugin.cpp 2025-04-20 16:30:35.210766510 +0200 @@ -1099,10 +1099,10 @@ std::make_unique(FD, true)); }; - auto AddBuffer = [&](size_t Task, const Twine &moduleName, + auto AddBuffer = [&](size_t Task, const Twine &ModuleName, std::unique_ptr MB) { - auto Stream = *AddStream(Task, ModuleName); - Stream->OS << MB->getBuffer(); + auto Stream = AddStream(Task, ModuleName); + *Stream->OS << MB->getBuffer(); check(Stream->commit(), "Failed to commit cache"); };