diff options
Diffstat (limited to 'include/llvm/BasicBlock.h')
-rw-r--r-- | include/llvm/BasicBlock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 551ca4d6c2..f15d2b46a9 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -85,6 +85,11 @@ public: BasicBlock *getPrev() { return Prev; } const BasicBlock *getPrev() const { return Prev; } + /// use_back - Specialize the methods defined in Value, as we know that an + /// BasicBlock can only be used by Instructions (specifically PHI and terms). + Instruction *use_back() { return cast<Instruction>(*use_begin());} + const Instruction *use_back() const { return cast<Instruction>(*use_begin());} + /// getTerminator() - If this is a well formed basic block, then this returns /// a pointer to the terminator instruction. If it is not, then you get a /// null pointer back. |