From cb4f10b4d5e9ba2e37e70424b290dd1187ca6ea7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 30 Sep 2006 22:20:34 +0000 Subject: Override use_back in instruction/basicblock to provide more type information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30678 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Instruction.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/llvm/Instruction.h') diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index cd024d0..591e0d2 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -71,7 +71,11 @@ public: /// extra information (e.g. load is volatile) agree. bool isIdenticalTo(Instruction *I) const; - + /// use_back - Specialize the methods defined in Value, as we know that an + /// instruction can only be used by other instructions. + Instruction *use_back() { return cast(*use_begin());} + const Instruction *use_back() const { return cast(*use_begin());} + // Accessor methods... // inline const BasicBlock *getParent() const { return Parent; } -- cgit v1.1