Specify S registers as D registers' sub-registers.
[oota-llvm.git] / lib / Target / TargetData.cpp
index dfa6d2a283a20fcaa899c1091eb8f745f19b90c0..10ee707aea4df205779d6348f9da880ff623e57b 100644 (file)
@@ -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));
   
@@ -400,7 +400,7 @@ uint64_t TargetData::getTypeSize(const Type *Ty) const {
     unsigned char Alignment;
     Size = getTypeSize(ATy->getElementType());
     Alignment = getABITypeAlignment(ATy->getElementType());
-    unsigned AlignedSize = (Size + Alignment - 1)/Alignment*Alignment;
+    uint64_t AlignedSize = (Size + Alignment - 1)/Alignment*Alignment;
     return AlignedSize*ATy->getNumElements();
   }
   case Type::StructTyID: {