diff options
author | James Y Knight <jyknight@google.com> | 2019-02-01 20:44:47 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-02-01 20:44:47 +0000 |
commit | 7716075a1729ead67844574fdb34579894122992 (patch) | |
tree | 1a3b91f53223202ab65c910dbc26979f5f05201c /llvm/lib/IR/ConstantFold.cpp | |
parent | 14359ef1b6a0610ac91df5f5a91c88a0b51c187c (diff) | |
download | bcm5719-llvm-7716075a1729ead67844574fdb34579894122992.tar.gz bcm5719-llvm-7716075a1729ead67844574fdb34579894122992.zip |
[opaque pointer types] Pass value type to GetElementPtr creation.
This cleans up all GetElementPtr creation in LLVM to explicitly pass a
value type rather than deriving it from the pointer's element-type.
Differential Revision: https://reviews.llvm.org/D57173
llvm-svn: 352913
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index b3093dbce3e..748a2ce475f 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -2071,7 +2071,7 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *PointeeTy, Constant *C, if (Idxs.empty()) return C; Type *GEPTy = GetElementPtrInst::getGEPReturnType( - C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); + PointeeTy, C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); if (isa<UndefValue>(C)) return UndefValue::get(GEPTy); |