Revert "Introduce a string_ostream string builder facilty"
[oota-llvm.git] / lib / MC / MCAsmStreamer.cpp
index a3a81a6bc71d5bc6ed03e29d4073cb53f98f7aa2..da235ec1d330ca9d6cc1a2aa2dd45db7209b08f2 100644 (file)
@@ -1175,10 +1175,9 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst,
   raw_ostream &OS = GetCommentOS();
   SmallString<256> Code;
   SmallVector<MCFixup, 4> Fixups;
-  {
-    raw_svector_ostream VecOS(Code);
-    Emitter->EncodeInstruction(Inst, VecOS, Fixups, STI);
-  }
+  raw_svector_ostream VecOS(Code);
+  Emitter->EncodeInstruction(Inst, VecOS, Fixups, STI);
+  VecOS.flush();
 
   // If we are showing fixups, create symbolic markers in the encoded
   // representation. We do this by making a per-bit map to the fixup item index,