Skip to content

[gold] Fix compilation #130334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025
Merged

Conversation

vitalybuka
Copy link
Collaborator

After #115331.

Created using spr 1.3.4
@llvmbot llvmbot added the LTO Link time optimization (regular/full LTO or ThinLTO) label Mar 7, 2025
@vitalybuka vitalybuka requested a review from anjenner March 7, 2025 19:46
@llvmbot
Copy link
Member

llvmbot commented Mar 7, 2025

@llvm/pr-subscribers-lto

Author: Vitaly Buka (vitalybuka)

Changes

After #115331.


Full diff: https://github.com/llvm/llvm-project/pull/130334.diff

1 Files Affected:

  • (modified) llvm/tools/gold/gold-plugin.cpp (+3-3)
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index b42bfbed3b873..256933d3f53f9 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -1117,10 +1117,10 @@ static std::vector<std::pair<SmallString<128>, bool>> runLTO() {
         std::make_unique<llvm::raw_fd_ostream>(FD, true));
   };
 
-  auto AddBuffer = [&](size_t Task, const Twine &moduleName,
+  auto AddBuffer = [&](size_t Task, const Twine &ModuleName,
                        std::unique_ptr<MemoryBuffer> 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");
   };
 

@vitalybuka vitalybuka requested a review from teresajohnson March 7, 2025 19:57
Copy link
Contributor

@teresajohnson teresajohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vitalybuka vitalybuka merged commit b0baa1d into main Mar 7, 2025
8 of 12 checks passed
@vitalybuka vitalybuka deleted the users/vitalybuka/spr/gold-fix-compilation branch March 7, 2025 20:06
dyung added a commit that referenced this pull request Mar 8, 2025
This reverts commit b0baa1d.

Reverting follow-up commit to ce9e1d3 since the original commit test is flaky.
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
anjenner pushed a commit to anjenner/llvm-project that referenced this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTO Link time optimization (regular/full LTO or ThinLTO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants