Fix a GCC buildbot that seemed to be having trouble producing the implicit move ctor
[oota-llvm.git] / lib / CodeGen / MachineBlockFrequencyInfo.cpp
index 35e4a56cec40201ee7da2a27355dbc8ae48a595c..10b0e929f2bba04ef3c193a7fd9eec221587bea2 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;
   }
 };
 
@@ -142,7 +143,7 @@ bool MachineBlockFrequencyInfo::runOnMachineFunction(MachineFunction &F) {
   MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
   if (!MBFI)
     MBFI.reset(new ImplType);
-  MBFI->doFunction(&F, &MBPI, &MLI);
+  MBFI->calculate(F, MBPI, MLI);
 #ifndef NDEBUG
   if (ViewMachineBlockFreqPropagationDAG != GVDT_None) {
     view();