summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Instruction.cpp')
-rw-r--r--llvm/lib/IR/Instruction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index a7773c47168..fd5bcc904fb 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -35,6 +35,10 @@ Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
}
}
+const DataLayout *Instruction::getDataLayout() const {
+ return getParent()->getDataLayout();
+}
+
Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
BasicBlock *InsertAtEnd)
: User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0) {
OpenPOWER on IntegriCloud