aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-12 23:02:08 +0000
committerChris Lattner <sabre@nondot.org>2009-09-12 23:02:08 +0000
commit7cb384dcca3f1ccfc993182ee4b972f7fffc8ffa (patch)
treee3202f7ce4416713cc41a6c9dd51da7e581a9029 /include/llvm/CodeGen
parentdeb8c1547e4410026a77d839ef75b6daeb0339db (diff)
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
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h19
1 files changed, 12 insertions, 7 deletions
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,