summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit798e84f59eb11eb2ae04b2b314307d4c4f9b415c (patch)
tree5a7550011f8fa4757384fd043b0c563c6269f648 /llvm/lib/Transforms/TransformInternals.cpp
parent46fa04b531f49339150c71b7b0ff4f81d34aac83 (diff)
downloadbcm5719-llvm-798e84f59eb11eb2ae04b2b314307d4c4f9b415c.tar.gz
bcm5719-llvm-798e84f59eb11eb2ae04b2b314307d4c4f9b415c.zip
Fix VS warnings
llvm-svn: 19383
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.cpp')
-rw-r--r--llvm/lib/Transforms/TransformInternals.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/TransformInternals.cpp b/llvm/lib/Transforms/TransformInternals.cpp
index 3f7d8dbbfa2..7aca6728f83 100644
--- a/llvm/lib/Transforms/TransformInternals.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud