We expect the pointer to be initialized by the above loop, but
if that's not executed, the contents are garbage.
A fix for the crash will be committed immediately after.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312353
91177308-0d34-0410-b5e6-
96231b3b80d8
int64_t Scale = 0;
auto GTI = gep_type_begin(PointeeType, Operands);
- Type *TargetType;
+ Type *TargetType = nullptr;
for (auto I = Operands.begin(); I != Operands.end(); ++I, ++GTI) {
TargetType = GTI.getIndexedType();
// We assume that the cost of Scalar GEP with constant index and the