std::string getNodeLabel(const BasicBlock *Node,
const BlockFrequencyInfo *Graph) {
- string_ostream OS;
+ std::string Result;
+ raw_string_ostream OS(Result);
- OS << Node->getName() << ":";
+ OS << Node->getName().str() << ":";
switch (ViewBlockFreqPropagationDAG) {
case GVDT_Fraction:
Graph->printBlockFreq(OS, Node);
"never reach this point.");
}
- return OS.str();
+ return Result;
}
};