diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-08 20:05:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-08 20:05:34 +0000 |
commit | feeab9f753d15eec6d447a70ff4fb4ae38111923 (patch) | |
tree | ef4a9cbe55c0efd0b9d30f7e7dfa1567c0da1b70 /llvm/lib | |
parent | 0b955fd2d5a226909ccf2de91f81ac924b65c9a2 (diff) | |
download | bcm5719-llvm-feeab9f753d15eec6d447a70ff4fb4ae38111923.tar.gz bcm5719-llvm-feeab9f753d15eec6d447a70ff4fb4ae38111923.zip |
Silence VS warnings
llvm-svn: 19389
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index 8616656360f..9037ab64103 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -703,7 +703,7 @@ void Interpreter::visitAllocationInst(AllocationInst &I) { unsigned NumElements = getOperandValue(I.getOperand(0), SF).UIntVal; // Allocate enough memory to hold the type... - void *Memory = malloc(NumElements * TD.getTypeSize(Ty)); + void *Memory = malloc(NumElements * (size_t)TD.getTypeSize(Ty)); GenericValue Result = PTOGV(Memory); assert(Result.PointerVal != 0 && "Null pointer returned by malloc!"); @@ -736,9 +736,9 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I, const StructLayout *SLO = TD.getStructLayout(STy); const ConstantUInt *CPU = cast<ConstantUInt>(I.getOperand()); - unsigned Index = CPU->getValue(); + unsigned Index = unsigned(CPU->getValue()); - Total += SLO->MemberOffsets[Index]; + Total += (PointerTy)SLO->MemberOffsets[Index]; } else { const SequentialType *ST = cast<SequentialType>(*I); // Get the index number for the array... which must be long type... @@ -756,7 +756,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I, case Type::UIntTyID: Idx = IdxGV.UIntVal; break; case Type::ULongTyID: Idx = IdxGV.ULongVal; break; } - Total += TD.getTypeSize(ST->getElementType())*Idx; + Total += PointerTy(TD.getTypeSize(ST->getElementType())*Idx); } } |