diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-08 19:34:41 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-08 19:34:41 +0000 |
| commit | ce274ce93de032513f3c13aa49fa2dd9908a273b (patch) | |
| tree | 424304695b3f931ec0ebcbf9ded258941cc1d100 /llvm/lib | |
| parent | 867158cefda41b8c6a430031e7de24c34067b9b1 (diff) | |
| download | bcm5719-llvm-ce274ce93de032513f3c13aa49fa2dd9908a273b.tar.gz bcm5719-llvm-ce274ce93de032513f3c13aa49fa2dd9908a273b.zip | |
Silence warnings
llvm-svn: 19379
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index b51f3ad68cb..c769b549916 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -771,12 +771,12 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) { ConstantStruct *CS = dyn_cast<ConstantStruct>(C); if (CS == 0) return 0; if (CU->getValue() >= CS->getNumOperands()) return 0; - C = CS->getOperand(CU->getValue()); + C = CS->getOperand((unsigned)CU->getValue()); } else if (ConstantSInt *CS = dyn_cast<ConstantSInt>(CE->getOperand(i))) { ConstantArray *CA = dyn_cast<ConstantArray>(C); if (CA == 0) return 0; if ((uint64_t)CS->getValue() >= CA->getNumOperands()) return 0; - C = CA->getOperand(CS->getValue()); + C = CA->getOperand((unsigned)CS->getValue()); } else return 0; return C; 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]; |

