encapsulate the rest of the StructLayout members.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 1ebe5b5..adbd22a 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -325,7 +325,7 @@
   case Type::StructTyID: {
     // Get the layout annotation... which is lazily created on demand.
     const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
-    Size = Layout->StructSize; Alignment = Layout->StructAlignment;
+    Size = Layout->getSizeInBytes(); Alignment = Layout->getAlignment();
     return;
   }
 
@@ -387,9 +387,9 @@
     // Get the layout annotation... which is lazily created on demand;
     // enforce minimum aggregate alignment.
     const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
-    Size = Layout->StructSize;
-    Alignment = std::max(Layout->StructAlignment,
-                         (const unsigned int) TD->getAggMinPrefAlignment());
+    Size = Layout->getSizeInBytes();
+    Alignment = std::max(Layout->getAlignment(),
+                         (const unsigned int)TD->getAggMinPrefAlignment());
     return;
   }