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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356394
91177308-0d34-0410-b5e6-
96231b3b80d8
llvm_unreachable("not scalar");
break;
}
- return S;
+ return OS.str();
}
/// Convert the StringRef and use it to set this DocNode (assuming scalar). If
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;
}