summaryrefslogtreecommitdiff
path: root/lib/Transforms/TransformInternals.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-08 19:48:40 +0000
committerChris Lattner <sabre@nondot.org>2005-01-08 19:48:40 +0000
commit22bc934720fe01aa389e65e4832509a71437adc7 (patch)
tree44133003b88d96c0c7950213cb351cf33df6f80e /lib/Transforms/TransformInternals.cpp
parent4d0801b243ebb05954ec2173b45ed9f892ef961a (diff)
downloadllvm-22bc934720fe01aa389e65e4832509a71437adc7.tar.gz
llvm-22bc934720fe01aa389e65e4832509a71437adc7.tar.bz2
llvm-22bc934720fe01aa389e65e4832509a71437adc7.tar.xz
Fix VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/TransformInternals.cpp')
-rw-r--r--lib/Transforms/TransformInternals.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/TransformInternals.cpp b/lib/Transforms/TransformInternals.cpp
index 3f7d8dbbfa..7aca6728f8 100644
--- a/lib/Transforms/TransformInternals.cpp
+++ b/lib/Transforms/TransformInternals.cpp
@@ -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;
}