diff options
Diffstat (limited to 'lib/TableGen')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 86ad2a6e3c..965cd00396 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -1271,10 +1271,11 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType, if (ItemType != 0) { ListRecTy *ListType = dyn_cast<ListRecTy>(ItemType); if (ListType == 0) { - std::stringstream s; - s << "Type mismatch for list, expected list type, got " - << ItemType->getAsString(); - TokError(s.str()); + std::string s; + raw_string_ostream ss(s); + ss << "Type mismatch for list, expected list type, got " + << ItemType->getAsString(); + TokError(ss.str()); return 0; } GivenListTy = ListType; |