diff options
Diffstat (limited to 'include/llvm/Support/GraphWriter.h')
-rw-r--r-- | include/llvm/Support/GraphWriter.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h index b1af3d7c2632..86985c569464 100644 --- a/include/llvm/Support/GraphWriter.h +++ b/include/llvm/Support/GraphWriter.h @@ -175,8 +175,9 @@ public: O << DOT::EscapeString(DTraits.getNodeLabel(Node, G)); // If we should include the address of the node in the label, do so now. - if (DTraits.hasNodeAddressLabel(Node, G)) - O << "|" << static_cast<const void*>(Node); + std::string Id = DTraits.getNodeIdentifierLabel(Node, G); + if (!Id.empty()) + O << "|" << DOT::EscapeString(Id); std::string NodeDesc = DTraits.getNodeDescription(Node, G); if (!NodeDesc.empty()) @@ -199,8 +200,9 @@ public: O << DOT::EscapeString(DTraits.getNodeLabel(Node, G)); // If we should include the address of the node in the label, do so now. - if (DTraits.hasNodeAddressLabel(Node, G)) - O << "|" << static_cast<const void*>(Node); + std::string Id = DTraits.getNodeIdentifierLabel(Node, G); + if (!Id.empty()) + O << "|" << DOT::EscapeString(Id); std::string NodeDesc = DTraits.getNodeDescription(Node, G); if (!NodeDesc.empty()) |