Revert "Introduce a string_ostream string builder facilty"
[oota-llvm.git] / lib / CodeGen / MachineBlockFrequencyInfo.cpp
index 35e4a56cec40201ee7da2a27355dbc8ae48a595c..9151d99089d6b35064f36ecc3a24381e571645f9 100644 (file)
@@ -89,9 +89,10 @@ struct DOTGraphTraits<MachineBlockFrequencyInfo*> :
 
   std::string getNodeLabel(const MachineBasicBlock *Node,
                            const MachineBlockFrequencyInfo *Graph) {
-    string_ostream OS;
+    std::string Result;
+    raw_string_ostream OS(Result);
 
-    OS << Node->getName() << ":";
+    OS << Node->getName().str() << ":";
     switch (ViewMachineBlockFreqPropagationDAG) {
     case GVDT_Fraction:
       Graph->printBlockFreq(OS, Node);
@@ -104,7 +105,7 @@ struct DOTGraphTraits<MachineBlockFrequencyInfo*> :
                        "never reach this point.");
     }
 
-    return OS.str();
+    return Result;
   }
 };