Start struct bit field laout work.
This is far from complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43801 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CodeGenTypes.h b/CodeGen/CodeGenTypes.h
index 6712b8e..68dcd21 100644
--- a/CodeGen/CodeGenTypes.h
+++ b/CodeGen/CodeGenTypes.h
@@ -76,6 +76,17 @@
/// field no. This info is populated by record organizer.
llvm::DenseMap<const FieldDecl *, unsigned> FieldInfo;
+ class BitFieldInfo {
+ public:
+ explicit BitFieldInfo(unsigned N, unsigned B, unsigned E)
+ : No(N), Begin(B), End(E) {}
+ private:
+ unsigned No;
+ unsigned Begin;
+ unsigned End;
+ };
+ llvm::DenseMap<const FieldDecl *, BitFieldInfo> BitFields;
+
/// RecordTypesToResolve - This keeps track of record types that are not
/// yet incomplete. One llvm::OpaqueType is associated with each incomplete
/// record.
@@ -113,7 +124,8 @@
unsigned getLLVMFieldNo(const FieldDecl *FD);
/// addFieldInfo - Assign field number to field FD.
- void addFieldInfo(const FieldDecl *FD, unsigned No);
+ void addFieldInfo(const FieldDecl *FD, unsigned No, unsigned Begin,
+ unsigned End);
};
} // end namespace CodeGen