llvm.org GIT mirror llvm / d073ea0
Make sure to print labels on nodes without names git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9376 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
3939
4040 static std::string getNodeLabel(const BasicBlock *Node,
4141 const Function *Graph) {
42 if (CFGOnly && !Node->getName().empty()) return Node->getName() + ":";
42 if (CFGOnly && !Node->getName().empty())
43 return Node->getName() + ":";
4344
4445 std::ostringstream Out;
4546 if (CFGOnly) {
4647 WriteAsOperand(Out, Node, false, true);
4748 return Out.str();
49 }
50
51 if (Node->getName().empty()) {
52 WriteAsOperand(Out, Node, false, true);
53 Out << ":";
4854 }
4955
5056 Out << *Node;