From 73cf872adb7983c464ad24dc28827defdf6b11d4 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 5 May 2015 18:03:48 +0000 Subject: [opaque pointer type] Track explicit GEP pointee type through in-memory IR llvm-svn: 236510 --- llvm/lib/IR/Instructions.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm/lib/IR/Instructions.cpp') diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index e46db2c4850..3e681380e9b 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -1243,10 +1243,11 @@ void GetElementPtrInst::init(Value *Ptr, ArrayRef IdxList, } GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) - : Instruction(GEPI.getType(), GetElementPtr, - OperandTraits::op_end(this) - - GEPI.getNumOperands(), - GEPI.getNumOperands()) { + : Instruction(GEPI.getType(), GetElementPtr, + OperandTraits::op_end(this) - + GEPI.getNumOperands(), + GEPI.getNumOperands()), + SourceElementType(GEPI.SourceElementType) { std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); SubclassOptionalData = GEPI.SubclassOptionalData; } -- cgit v1.2.3