mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Fix VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -73,7 +73,7 @@ const Type *llvm::getStructOffsetType(const Type *Ty, unsigned &Offset,
|
||||
"Offset not in composite!");
|
||||
|
||||
NextType = ATy->getElementType();
|
||||
unsigned ChildSize = TD.getTypeSize(NextType);
|
||||
unsigned ChildSize = (unsigned)TD.getTypeSize(NextType);
|
||||
if (ConstantSInt::isValueValidForType(Type::IntTy, Offset/ChildSize))
|
||||
Indices.push_back(ConstantSInt::get(Type::IntTy, Offset/ChildSize));
|
||||
else
|
||||
@ -84,10 +84,10 @@ const Type *llvm::getStructOffsetType(const Type *Ty, unsigned &Offset,
|
||||
return Ty; // Return the leaf type
|
||||
}
|
||||
|
||||
unsigned SubOffs = Offset - ThisOffset;
|
||||
unsigned SubOffs = unsigned(Offset - ThisOffset);
|
||||
const Type *LeafTy = getStructOffsetType(NextType, SubOffs,
|
||||
Indices, TD, StopEarly);
|
||||
Offset = ThisOffset + SubOffs;
|
||||
Offset = unsigned(ThisOffset + SubOffs);
|
||||
return LeafTy;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user