[llvm] r356394 - [MsgPack][AMDGPU] Fix unflushed raw_string_ostream bugs on windows expensive checks bot
Tim Renouf via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 12:00:47 PDT 2019
Author: tpr
Date: Mon Mar 18 12:00:46 2019
New Revision: 356394
URL: http://llvm.org/viewvc/llvm-project?rev=356394&view=rev
Log:
[MsgPack][AMDGPU] Fix unflushed raw_string_ostream bugs on windows expensive checks bot
This fixes a couple of unflushed raw_string_ostream bugs in recent
commits that only show up on a bot building on windows with expensive
checks.
Differential Revision: https://reviews.llvm.org/D59396
Change-Id: I9c6208325503b3ee0786b4b688e13fc24a15babf
Modified:
llvm/trunk/lib/BinaryFormat/MsgPackDocumentYAML.cpp
llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
Modified: llvm/trunk/lib/BinaryFormat/MsgPackDocumentYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/BinaryFormat/MsgPackDocumentYAML.cpp?rev=356394&r1=356393&r2=356394&view=diff
==============================================================================
--- llvm/trunk/lib/BinaryFormat/MsgPackDocumentYAML.cpp (original)
+++ llvm/trunk/lib/BinaryFormat/MsgPackDocumentYAML.cpp Mon Mar 18 12:00:46 2019
@@ -61,7 +61,7 @@ std::string DocNode::toString() const {
llvm_unreachable("not scalar");
break;
}
- return S;
+ return OS.str();
}
/// Convert the StringRef and use it to set this DocNode (assuming scalar). If
Modified: llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp?rev=356394&r1=356393&r2=356394&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp Mon Mar 18 12:00:46 2019
@@ -323,8 +323,10 @@ MCPhysReg SIMachineFunctionInfo::getNext
static yaml::StringValue regToString(unsigned Reg,
const TargetRegisterInfo &TRI) {
yaml::StringValue Dest;
- raw_string_ostream OS(Dest.Value);
- OS << printReg(Reg, &TRI);
+ {
+ raw_string_ostream OS(Dest.Value);
+ OS << printReg(Reg, &TRI);
+ }
return Dest;
}
More information about the llvm-commits
mailing list