From 06f9d4012fb8acea3e9861d5722b5965dbb724d9 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 1 Dec 2009 11:07:05 +0000 Subject: Update LLVM to r90226. --- lib/CodeGen/MachineFunction.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/MachineFunction.cpp') diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 81d1301336b8b..d20f4464e502d 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -359,14 +359,16 @@ void MachineFunction::print(raw_ostream &OS) const { namespace llvm { template<> struct DOTGraphTraits : public DefaultDOTGraphTraits { + + DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {} + static std::string getGraphName(const MachineFunction *F) { 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() + ":"; @@ -374,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