Skip to content

Commit 94f6f98

Browse files
AidanBeltonSvmaksimo
authored andcommitted
[libclc] Fix build failure after 6422164 Make OutputBuffer non-copyable
1 parent 3b6453e commit 94f6f98

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libclc/utils/libclc-remangler/LibclcRemangler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,14 @@ class Remangler {
172172
SmallVector<std::string, 16> Subs;
173173
bool Failed = false;
174174

175-
OutputBuffer printNode(const Node *node) {
176-
OutputBuffer nodeOutBuffer;
175+
void printNode(const Node *node, OutputBuffer &nodeOutBuffer) {
177176
initializeOutputBuffer(nullptr, nullptr, nodeOutBuffer, 1024);
178177
node->print(nodeOutBuffer);
179-
return nodeOutBuffer;
180178
}
181179

182180
void addSub(const Node *node) {
183-
OutputBuffer nodeOut = printNode(node);
181+
OutputBuffer nodeOut;
182+
printNode(node, nodeOut);
184183
char *nodeOutBuf = nodeOut.getBuffer();
185184
auto nodeOutStr =
186185
std::string(nodeOutBuf, nodeOutBuf + nodeOut.getCurrentPosition());
@@ -189,7 +188,8 @@ class Remangler {
189188
}
190189

191190
bool findSub(const Node *node, size_t *index) {
192-
OutputBuffer nodeOut = printNode(node);
191+
OutputBuffer nodeOut;
192+
printNode(node, nodeOut);
193193
char *nodeOutBuf = nodeOut.getBuffer();
194194
auto nodeOutStr =
195195
std::string(nodeOutBuf, nodeOutBuf + nodeOut.getCurrentPosition());

0 commit comments

Comments
 (0)