summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Instruction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index b5a30a4969b..7bd50328b12 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -62,6 +62,11 @@ Module *Instruction::getModule() {
return getParent()->getModule();
}
+Function *Instruction::getFunction() { return getParent()->getParent(); }
+
+const Function *Instruction::getFunction() const {
+ return getParent()->getParent();
+}
void Instruction::removeFromParent() {
getParent()->getInstList().remove(getIterator());
OpenPOWER on IntegriCloud