Changes in directory llvm/include/llvm/Target:

TargetData.h updated: 1.50 -> 1.51
---
Log message:

encapsulate the rest of the StructLayout members.


---
Diffs of the changes:  (+9 -1)

 TargetData.h |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Target/TargetData.h
diff -u llvm/include/llvm/Target/TargetData.h:1.50 
llvm/include/llvm/Target/TargetData.h:1.51
--- llvm/include/llvm/Target/TargetData.h:1.50  Sat Feb 10 13:55:17 2007
+++ llvm/include/llvm/Target/TargetData.h       Sat Feb 10 13:59:22 2007
@@ -276,10 +276,18 @@
 ///
 class StructLayout {
   std::vector<uint64_t> MemberOffsets;
-public:
   unsigned StructAlignment;
   uint64_t StructSize;
+public:
 
+  uint64_t getSizeInBytes() const {
+    return StructSize;
+  }
+  
+  unsigned getAlignment() const {
+    return StructAlignment;
+  }
+    
   /// getElementContainingOffset - Given a valid offset into the structure,
   /// return the structure index that contains it.
   ///



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to