Move helper for getting a terminating musttail call to BasicBlock

No functional change.  To be used in future commits that need to look
for such instructions.

Reviewed By: rafael

Differential Revision: http://reviews.llvm.org/D4504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215413 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2014-08-12 00:05:15 +00:00
parent 524cd2eb7b
commit 2970677f21
3 changed files with 45 additions and 30 deletions

View File

@@ -23,6 +23,7 @@
namespace llvm {
class CallInst;
class LandingPadInst;
class TerminatorInst;
class LLVMContext;
@@ -125,6 +126,14 @@ public:
TerminatorInst *getTerminator();
const TerminatorInst *getTerminator() const;
/// \brief Returns the call instruction marked 'musttail' prior to the
/// terminating return instruction of this basic block, if such a call is
/// present. Otherwise, returns null.
CallInst *getTerminatingMustTailCall();
const CallInst *getTerminatingMustTailCall() const {
return const_cast<BasicBlock *>(this)->getTerminatingMustTailCall();
}
/// \brief Returns a pointer to the first instruction in this block that is
/// not a PHINode instruction.
///