summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-10-16 22:47:26 +0000
committerErich Keane <erich.keane@intel.com>2017-10-16 22:47:26 +0000
commitdf9e8aef6d6bad60cdf7a79d389a085020dd02e9 (patch)
tree8775c04269409e31ace28f688a87b983cbba1c35 /clang
parentccd43758ada7e0991ac13e79975b7f4641e31520 (diff)
downloadbcm5719-llvm-df9e8aef6d6bad60cdf7a79d389a085020dd02e9.tar.gz
bcm5719-llvm-df9e8aef6d6bad60cdf7a79d389a085020dd02e9.zip
Replace usage of std::stringstream with raw_string_ostream
Typically we don't use the stringstream, so instead use raw_string_stream. Additionally, the dependent function changed to use raw_ostream. llvm-svn: 315950
Diffstat (limited to 'clang')
-rw-r--r--clang/utils/TableGen/ClangAttrEmitter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 6e19fc87d11..fe615468b16 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -2998,7 +2998,7 @@ static bool isArgVariadic(const Record &R, StringRef AttrName) {
return createArgument(R, AttrName)->isVariadic();
}
-static void emitArgInfo(const Record &R, std::stringstream &OS) {
+static void emitArgInfo(const Record &R, raw_ostream &OS) {
// This function will count the number of arguments specified for the
// attribute and emit the number of required arguments followed by the
// number of optional arguments.
@@ -3471,7 +3471,8 @@ void EmitClangAttrParsedAttrImpl(RecordKeeper &Records, raw_ostream &OS) {
// another mapping. At the same time, generate the AttrInfoMap object
// contents. Due to the reliance on generated code, use separate streams so
// that code will not be interleaved.
- std::stringstream SS;
+ std::string Buffer;
+ raw_string_ostream SS {Buffer};
for (auto I = Attrs.begin(), E = Attrs.end(); I != E; ++I) {
// TODO: If the attribute's kind appears in the list of duplicates, that is
// because it is a target-specific attribute that appears multiple times.
OpenPOWER on IntegriCloud