aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r--include/llvm/Instruction.h6
1 files changed, 5 insertions, 1 deletions
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<Instruction>(*use_begin());}
+ const Instruction *use_back() const { return cast<Instruction>(*use_begin());}
+
// Accessor methods...
//
inline const BasicBlock *getParent() const { return Parent; }