summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/TargetData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index b1f08079f0e..10ee707aea4 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/lib/Target/TargetData.cpp
@@ -342,7 +342,7 @@ const StructLayout *TargetData::getStructLayout(const StructType *Ty) const {
// Otherwise, create the struct layout. Because it is variable length, we
// malloc it, then use placement new.
- unsigned NumElts = Ty->getNumElements();
+ int NumElts = Ty->getNumElements();
StructLayout *L =
(StructLayout *)malloc(sizeof(StructLayout)+(NumElts-1)*sizeof(uint64_t));
OpenPOWER on IntegriCloud