summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-11-20 01:17:03 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-11-20 01:17:03 +0000
commit324da7647cfc3025e0c987176f0a300f9f780e6f (patch)
tree56374dc2107fe1ce80ef47b98fbfb3b879a1f33c /include/llvm/CodeGen/MachineBasicBlock.h
parentac146657fc2dc63e9856e0090fd0bec4ba9befd3 (diff)
downloadllvm-324da7647cfc3025e0c987176f0a300f9f780e6f.tar.gz
llvm-324da7647cfc3025e0c987176f0a300f9f780e6f.tar.bz2
llvm-324da7647cfc3025e0c987176f0a300f9f780e6f.tar.xz
Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.
Fix debug code that assumes getBasicBlock never returns NULL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index bb50b5df4c..78662784eb 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -92,10 +92,15 @@ class MachineBasicBlock : public ilist_node<MachineBasicBlock> {
public:
/// getBasicBlock - Return the LLVM basic block that this instance
- /// corresponded to originally.
+ /// corresponded to originally. Note that this may be NULL if this instance
+ /// does not correspond directly to an LLVM basic block.
///
const BasicBlock *getBasicBlock() const { return BB; }
+ /// getName - Return the name of the corresponding LLVM basic block, or
+ /// "(null)".
+ StringRef getName() const;
+
/// hasAddressTaken - Test whether this block is potentially the target
/// of an indirect branch.
bool hasAddressTaken() const { return AddressTaken; }