Skip to content

Commit

Permalink
[FIRRTL] Fix Twine being mistakenly stored on the stack
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianschuiki committed Oct 22, 2021
1 parent 47bd2df commit 36b6d67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Dialect/FIRRTL/Transforms/EmitOMIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ void EmitOMIRPass::emitSourceInfo(Location input, SmallString<64> &into) {
input->walk([&](Location loc) {
if (FileLineColLoc fileLoc = loc.dyn_cast<FileLineColLoc>()) {
into.append(into.empty() ? "@[" : " ");
auto twine = Twine(fileLoc.getFilename()) + " " +
Twine(fileLoc.getLine()) + ":" + Twine(fileLoc.getColumn());
twine.toVector(into);
(Twine(fileLoc.getFilename()) + " " + Twine(fileLoc.getLine()) + ":" +
Twine(fileLoc.getColumn()))
.toVector(into);
}
return WalkResult::advance();
});
Expand Down

0 comments on commit 36b6d67

Please sign in to comment.