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 | cdf38c4edb892c356cfaa3c09c57728bc8d6bfd0 (patch) | |
tree | 23acb79c44a2b1034739fd770d2f9b35a7834122 /lib/CodeGen/AsmPrinter.cpp | |
parent | 5425267e84946676f1e7424ee056f71b23497ee7 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 1753160e1f..76a03dce95 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/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(); } |