summaryrefslogtreecommitdiff
path: root/lib/TableGen/SetTheory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TableGen/SetTheory.cpp')
-rw-r--r--lib/TableGen/SetTheory.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/TableGen/SetTheory.cpp b/lib/TableGen/SetTheory.cpp
index 594d4d9a94..c99c2bab45 100644
--- a/lib/TableGen/SetTheory.cpp
+++ b/lib/TableGen/SetTheory.cpp
@@ -209,12 +209,13 @@ struct SequenceOp : public SetTheory::Operator {
break;
else if (Step < 0 && From < To)
break;
- string_ostream Name;
- Name << format(Format.c_str(), unsigned(From));
- Record *Rec = Records.getDef(Name.str());
+ std::string Name;
+ raw_string_ostream OS(Name);
+ OS << format(Format.c_str(), unsigned(From));
+ Record *Rec = Records.getDef(OS.str());
if (!Rec)
- PrintFatalError(Loc, "No def named '" + Name.str() + "': " +
- Expr->getAsString());
+ PrintFatalError(Loc, "No def named '" + Name + "': " +
+ Expr->getAsString());
// Try to reevaluate Rec in case it is a set.
if (const RecVec *Result = ST.expand(Rec))
Elts.insert(Result->begin(), Result->end());