From 56f4ef3232850e29c4635d0923910acce8887bd0 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 30 Nov 2009 12:38:47 +0000 Subject: Remove ShortNames from getNodeLabel in DOTGraphTraits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineFunction.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/MachineFunction.cpp') diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index db7b94926c..d20f4464e5 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -366,10 +366,9 @@ namespace llvm { return "CFG for '" + F->getFunction()->getNameStr() + "' function"; } - static std::string getNodeLabel(const MachineBasicBlock *Node, - const MachineFunction *Graph, - bool ShortNames) { - if (ShortNames && Node->getBasicBlock() && + std::string getNodeLabel(const MachineBasicBlock *Node, + const MachineFunction *Graph) { + if (isSimple () && Node->getBasicBlock() && !Node->getBasicBlock()->getName().empty()) return Node->getBasicBlock()->getNameStr() + ":"; @@ -377,7 +376,7 @@ namespace llvm { { raw_string_ostream OSS(OutStr); - if (ShortNames) + if (isSimple()) OSS << Node->getNumber() << ':'; else Node->print(OSS); -- cgit v1.2.3-18-g5258