llvm-cov: Simplify FunctionInstantiationSetCollector (NFC)
[oota-llvm.git] / tools / llvm-readobj / Win64EHDumper.cpp
index 2d6784348600af72fe6ee8a9da5b53821b7ecbd0..f058632a8ce89e4310fa8321a3cd7d53cc9e193e 100644 (file)
@@ -115,7 +115,8 @@ static unsigned getNumUsedSlots(const UnwindCode &UnwindCode) {
 static std::string formatSymbol(const Dumper::Context &Ctx,
                                 const coff_section *Section, uint64_t Offset,
                                 uint32_t Displacement) {
-  string_ostream OS;
+  std::string Buffer;
+  raw_string_ostream OS(Buffer);
 
   StringRef Name;
   SymbolRef Symbol;
@@ -130,7 +131,6 @@ static std::string formatSymbol(const Dumper::Context &Ctx,
     OS << format(" +0x%X (0x%" PRIX64 ")", Displacement, Offset);
   else
     OS << format(" (0x%" PRIX64 ")", Offset);
-
   return OS.str();
 }