Skip to content

Commit ae4ad5a

Browse files
authored
Fix clang-rocm-6.4.0 build (#88)
The patch is cherrypick of LLVM commit b0baa1d8
1 parent 7294b0a commit ae4ad5a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
2+
index 0d4ca5299689..1a9ecffae38c 100644
3+
--- a/llvm/tools/gold/gold-plugin.cpp
4+
+++ b/llvm/tools/gold/gold-plugin.cpp
5+
@@ -1099,10 +1099,10 @@ static std::vector<std::pair<SmallString<128>, bool>> runLTO() {
6+
std::make_unique<llvm::raw_fd_ostream>(FD, true));
7+
};
8+
9+
- auto AddBuffer = [&](size_t Task, const Twine &moduleName,
10+
+ auto AddBuffer = [&](size_t Task, const Twine &ModuleName,
11+
std::unique_ptr<MemoryBuffer> MB) {
12+
- auto Stream = *AddStream(Task, ModuleName);
13+
- Stream->OS << MB->getBuffer();
14+
+ auto Stream = AddStream(Task, ModuleName);
15+
+ *Stream->OS << MB->getBuffer();
16+
check(Stream->commit(), "Failed to commit cache");
17+
};
18+

0 commit comments

Comments
 (0)