summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Renouf <tpr.llvm@botech.co.uk>2019-03-18 19:00:46 +0000
committerTim Renouf <tpr.llvm@botech.co.uk>2019-03-18 19:00:46 +0000
commit8723a5655172dcea0e26c72c2def7deb9ad83188 (patch)
treedc0537dc7418881a3a0851eece3656a3d1891cb9
parentf07062a7984cf277baa381dcb7284beb9f7af4a8 (diff)
downloadbcm5719-llvm-8723a5655172dcea0e26c72c2def7deb9ad83188.tar.gz
bcm5719-llvm-8723a5655172dcea0e26c72c2def7deb9ad83188.zip
[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 llvm-svn: 356394
-rw-r--r--llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp2
-rw-r--r--llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp b/llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
index ae67d7be132..1d9c81ef8eb 100644
--- a/llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
+++ b/llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
@@ -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
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index 834f651c42d..245b5e74ac6 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -323,8 +323,10 @@ MCPhysReg SIMachineFunctionInfo::getNextSystemSGPR() const {
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;
}
OpenPOWER on IntegriCloud