diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-06-01 03:09:34 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-06-01 03:09:34 +0000 |
commit | f5147ef0b997cfd18f7e16efbaeeac98afdc55ab (patch) | |
tree | 01042fadd4aa42eb390453b1e11b40435d3b6bae /llvm/lib/IR | |
parent | 227e1aeb1306e1d2c184ca460b11178794406a65 (diff) | |
download | bcm5719-llvm-f5147ef0b997cfd18f7e16efbaeeac98afdc55ab.tar.gz bcm5719-llvm-f5147ef0b997cfd18f7e16efbaeeac98afdc55ab.zip |
[opaque pointer type] Explicitly store the pointee type of the result of a GEP
Alternatively, this type could be derived on-demand whenever
getResultElementType is called - if someone thinks that's the better
choice (simple time/space tradeoff), I'm happy to give it a go.
llvm-svn: 238716
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 332df4804da..1478bffe7c3 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -1249,7 +1249,8 @@ GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) OperandTraits<GetElementPtrInst>::op_end(this) - GEPI.getNumOperands(), GEPI.getNumOperands()), - SourceElementType(GEPI.SourceElementType) { + SourceElementType(GEPI.SourceElementType), + ResultElementType(GEPI.ResultElementType) { std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); SubclassOptionalData = GEPI.SubclassOptionalData; } |