mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Include MachineBasicBlock numbers in viewCFG() output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b4bb218d1
commit
e5f4e9fb2b
@ -347,17 +347,15 @@ namespace llvm {
|
|||||||
|
|
||||||
std::string getNodeLabel(const MachineBasicBlock *Node,
|
std::string getNodeLabel(const MachineBasicBlock *Node,
|
||||||
const MachineFunction *Graph) {
|
const MachineFunction *Graph) {
|
||||||
if (isSimple () && Node->getBasicBlock() &&
|
|
||||||
!Node->getBasicBlock()->getName().empty())
|
|
||||||
return Node->getBasicBlock()->getNameStr() + ":";
|
|
||||||
|
|
||||||
std::string OutStr;
|
std::string OutStr;
|
||||||
{
|
{
|
||||||
raw_string_ostream OSS(OutStr);
|
raw_string_ostream OSS(OutStr);
|
||||||
|
|
||||||
if (isSimple())
|
if (isSimple()) {
|
||||||
OSS << Node->getNumber() << ':';
|
OSS << "BB#" << Node->getNumber();
|
||||||
else
|
if (const BasicBlock *BB = Node->getBasicBlock())
|
||||||
|
OSS << ": " << BB->getName();
|
||||||
|
} else
|
||||||
Node->print(OSS);
|
Node->print(OSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user