mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
[opaque pointer type] Pass explicit pointee type in another case of GEP constant folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f12338a6b7
commit
47ee653cdc
@ -2221,7 +2221,7 @@ static Constant *ConstantFoldGetElementPtrImpl(Type *PointeeTy, Constant *C,
|
||||
if (!NewIdxs.empty()) {
|
||||
for (unsigned i = 0, e = Idxs.size(); i != e; ++i)
|
||||
if (!NewIdxs[i]) NewIdxs[i] = cast<Constant>(Idxs[i]);
|
||||
return ConstantExpr::getGetElementPtr(nullptr, C, NewIdxs, inBounds);
|
||||
return ConstantExpr::getGetElementPtr(PointeeTy, C, NewIdxs, inBounds);
|
||||
}
|
||||
|
||||
// If all indices are known integers and normalized, we can do a simple
|
||||
|
Loading…
Reference in New Issue
Block a user