]> granicus.if.org Git - clang/commitdiff
IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 14 Apr 2010 04:07:59 +0000 (04:07 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 14 Apr 2010 04:07:59 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101221 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRecordLayout.h

index 234f8591182bebebc2874c18eb398121b319ad97..86ae27e2bb5136766afaf5cc607a04e7bcd70922 100644 (file)
@@ -101,8 +101,16 @@ public:
   bool IsSigned : 1;
 
 public:
+  /// \brief Check whether this bit-field access is (i.e., should be sign
+  /// extended on loads).
   bool isSigned() const { return IsSigned; }
 
+  /// \brief Get the size of the bit-field, in bits.
+  unsigned getSize() const { return Size; }
+
+  /// @name Component Access
+  /// @{
+
   unsigned getNumComponents() const { return NumComponents; }
   void setNumComponents(unsigned Value) {
     assert(Value < 4 && "Invalid number of components!");
@@ -118,6 +126,8 @@ public:
     return Components[Index];
   }
 
+  /// @}
+
   void print(llvm::raw_ostream &OS) const;
   void dump() const;
 };