diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 8c8df54c2e0..f934f1f1274 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -183,7 +183,8 @@ bool SROA::performScalarRepl(Function &F) { Instruction *User = cast<Instruction>(AI->use_back()); GetElementPtrInst *GEPI = cast<GetElementPtrInst>(User); // We now know that the GEP is of the form: GEP <ptr>, 0, <cst> - uint64_t Idx = cast<ConstantInt>(GEPI->getOperand(2))->getRawValue(); + unsigned Idx = + (unsigned)cast<ConstantInt>(GEPI->getOperand(2))->getRawValue(); assert(Idx < ElementAllocas.size() && "Index out of range?"); AllocaInst *AllocaToUse = ElementAllocas[Idx]; |

