diff options
author | Nate Begeman <natebegeman@mac.com> | 2006-05-02 05:37:32 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2006-05-02 05:37:32 +0000 |
commit | b9d4f8324dc6b076b48d1583ea55d7c9c22407ad (patch) | |
tree | 660fbbaf1dffadfba25f0240c6043dd370ea03e7 /llvm/lib/CodeGen/AsmPrinter.cpp | |
parent | 01364fbba8345f27e4c30fb8021a0a97094821a5 (diff) | |
download | bcm5719-llvm-b9d4f8324dc6b076b48d1583ea55d7c9c22407ad.tar.gz bcm5719-llvm-b9d4f8324dc6b076b48d1583ea55d7c9c22407ad.zip |
Extend printBasicBlockLabel a bit so that it can be used to print all
basic block labels, consolidating the code to do so in one place for each
target.
llvm-svn: 28050
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 1753160e1f0..76a03dce95d 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -728,9 +728,14 @@ bool AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, /// printBasicBlockLabel - This method prints the label for the specified /// MachineBasicBlock -void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB) const { +void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB, + bool printColon, + bool printComment) const { O << PrivateGlobalPrefix << "LBB" << Mang->getValueName(MBB->getParent()->getFunction()) - << "_" << MBB->getNumber() << '\t' << CommentString - << MBB->getBasicBlock()->getName(); + << "_" << MBB->getNumber(); + if (printColon) + O << ':'; + if (printComment) + O << '\t' << CommentString << MBB->getBasicBlock()->getName(); } |