X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FYAMLTraits.h;h=14ca2db9326e3a95224ad9aea5a9221fcfef4c7f;hp=a23faf65bb596f8f873b60d4e304d49a1b7b2086;hb=255907042245b77779e3e38c5ce66901866cabe5;hpb=ce6e7c7a59e8595ea3f30d87cbad4af278cb5ef3 diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h index a23faf65bb5..14ca2db9326 100644 --- a/include/llvm/Support/YAMLTraits.h +++ b/include/llvm/Support/YAMLTraits.h @@ -612,8 +612,7 @@ template typename std::enable_if::value,void>::type yamlize(IO &io, T &Val, bool) { if ( io.outputting() ) { - std::string Storage; - llvm::raw_string_ostream Buffer(Storage); + llvm::string_ostream Buffer; ScalarTraits::output(Val, io.getContext(), Buffer); StringRef Str = Buffer.str(); io.scalarString(Str, ScalarTraits::mustQuote(Str));