summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-05-05 18:03:48 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-05-05 18:03:48 +0000
commit73cf872adb7983c464ad24dc28827defdf6b11d4 (patch)
tree4f79f94c1043e4b9520d5c33bcee03d1aa76394a /llvm/lib/IR
parent26438d26fa4966e49ada9c74d014f3ae2c14a7d2 (diff)
downloadbcm5719-llvm-73cf872adb7983c464ad24dc28827defdf6b11d4.tar.gz
bcm5719-llvm-73cf872adb7983c464ad24dc28827defdf6b11d4.zip
[opaque pointer type] Track explicit GEP pointee type through in-memory IR
llvm-svn: 236510
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Instructions.cpp9
1 files changed, 5 insertions, 4 deletions
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<Value *> IdxList,
}
GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
- : Instruction(GEPI.getType(), GetElementPtr,
- OperandTraits<GetElementPtrInst>::op_end(this)
- - GEPI.getNumOperands(),
- GEPI.getNumOperands()) {
+ : Instruction(GEPI.getType(), GetElementPtr,
+ OperandTraits<GetElementPtrInst>::op_end(this) -
+ GEPI.getNumOperands(),
+ GEPI.getNumOperands()),
+ SourceElementType(GEPI.SourceElementType) {
std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin());
SubclassOptionalData = GEPI.SubclassOptionalData;
}
OpenPOWER on IntegriCloud