summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGRecordLayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGRecordLayout.h')
-rw-r--r--clang/lib/CodeGen/CGRecordLayout.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGRecordLayout.h b/clang/lib/CodeGen/CGRecordLayout.h
index 86ae27e2bb5..dd60dbd593b 100644
--- a/clang/lib/CodeGen/CGRecordLayout.h
+++ b/clang/lib/CodeGen/CGRecordLayout.h
@@ -77,9 +77,6 @@ public:
};
private:
- /// The number of access components to use.
- unsigned NumComponents;
-
/// The components to use to access the bit-field. We may need up to three
/// separate components to support up to i64 bit-field access (4 + 2 + 1 byte
/// accesses).
@@ -87,20 +84,20 @@ private:
// FIXME: De-hardcode this, just allocate following the struct.
AccessInfo Components[3];
-public:
- CGBitFieldInfo(const llvm::Type *FieldTy, unsigned FieldNo,
- unsigned Start, unsigned Size, bool IsSigned)
- : FieldTy(FieldTy), FieldNo(FieldNo),
- Start(Start), Size(Size), IsSigned(IsSigned) {}
+ /// The total size of the bit-field, in bits.
+ unsigned Size;
- const llvm::Type *FieldTy;
- unsigned FieldNo;
+ /// The number of access components to use.
+ unsigned NumComponents;
- unsigned Start;
- unsigned Size;
+ /// Whether the bit-field is signed.
bool IsSigned : 1;
public:
+ CGBitFieldInfo(unsigned Size, bool IsSigned)
+ : Size(Size), IsSigned(IsSigned) {}
+
+public:
/// \brief Check whether this bit-field access is (i.e., should be sign
/// extended on loads).
bool isSigned() const { return IsSigned; }
OpenPOWER on IntegriCloud