static std::string getNodeLabel(const BasicBlock *Node,
const Function *Graph) {
static std::string getNodeLabel(const BasicBlock *Node,
const Function *Graph) {
- if (CFGOnly && !Node->getName().empty()) return Node->getName() + ":";
+ if (CFGOnly && !Node->getName().empty())
+ return Node->getName() + ":";
std::ostringstream Out;
if (CFGOnly) {
std::ostringstream Out;
if (CFGOnly) {
+ if (Node->getName().empty()) {
+ WriteAsOperand(Out, Node, false, true);
+ Out << ":";
+ }
+
Out << *Node;
std::string OutStr = Out.str();
if (OutStr[0] == '\n') OutStr.erase(OutStr.begin());
Out << *Node;
std::string OutStr = Out.str();
if (OutStr[0] == '\n') OutStr.erase(OutStr.begin());