summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-26 22:52:05 +0000
committerAlp Toker <alp@nuanti.com>2014-06-26 22:52:05 +0000
commite69170a11079504e1b20ec79296925f295dc01c0 (patch)
tree7c415eb6c14f0afb0e97e42d6ba2579dd897fb3a /llvm/lib/TableGen
parent11c6f6165b76a42da7eaf4514e419be397d7fc44 (diff)
downloadbcm5719-llvm-e69170a11079504e1b20ec79296925f295dc01c0.tar.gz
bcm5719-llvm-e69170a11079504e1b20ec79296925f295dc01c0.zip
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. llvm-svn: 211814
Diffstat (limited to 'llvm/lib/TableGen')
-rw-r--r--llvm/lib/TableGen/SetTheory.cpp11
-rw-r--r--llvm/lib/TableGen/TGParser.cpp3
2 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/TableGen/SetTheory.cpp b/llvm/lib/TableGen/SetTheory.cpp
index 594d4d9a942..c99c2bab45a 100644
--- a/llvm/lib/TableGen/SetTheory.cpp
+++ b/llvm/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());
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index 76ef696c68c..0550692ebce 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -1307,7 +1307,8 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType,
if (ItemType) {
ListRecTy *ListType = dyn_cast<ListRecTy>(ItemType);
if (!ListType) {
- string_ostream ss;
+ std::string s;
+ raw_string_ostream ss(s);
ss << "Type mismatch for list, expected list type, got "
<< ItemType->getAsString();
TokError(ss.str());
OpenPOWER on IntegriCloud