From 7cb384dcca3f1ccfc993182ee4b972f7fffc8ffa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 12 Sep 2009 23:02:08 +0000 Subject: devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden. Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that we only have one place that decides what to name bb labels. Hopefully various clients of printBasicBlockLabel can start using GetMBBSymbol instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81652 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/AsmPrinter.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 88534a54d5..cd30b39e36 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -46,6 +46,7 @@ namespace llvm { class MCContext; class MCSection; class MCStreamer; + class MCSymbol; class DwarfWriter; class Mangler; class MCAsmInfo; @@ -345,6 +346,16 @@ namespace llvm { /// instructions, do not use this function outside of llvm-mc. virtual void printMCInst(const MCInst *MI); + /// GetMBBSymbol - Return the MCSymbol corresponding to the specified basic + /// block label. + MCSymbol *GetMBBSymbol(unsigned MBBID) const; + + /// printBasicBlockLabel - This method prints the label for the specified + /// MachineBasicBlock + void printBasicBlockLabel(const MachineBasicBlock *MBB, + bool printAlign = false, + bool printColon = false, + bool printComment = true) const; protected: /// EmitZeros - Emit a block of zeros. /// @@ -375,13 +386,7 @@ namespace llvm { /// that is an implicit def. virtual void printImplicitDef(const MachineInstr *MI) const; - /// printBasicBlockLabel - This method prints the label for the specified - /// MachineBasicBlock - virtual void printBasicBlockLabel(const MachineBasicBlock *MBB, - bool printAlign = false, - bool printColon = false, - bool printComment = true) const; - + /// printPICJumpTableSetLabel - This method prints a set label for the /// specified MachineBasicBlock for a jumptable entry. virtual void printPICJumpTableSetLabel(unsigned uid, -- cgit v1.2.3-70-g09d2