diff options
author | Anders Carlsson <andersca@mac.com> | 2009-07-23 17:01:21 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-07-23 17:01:21 +0000 |
commit | 8330ceeebb3bfac31116b387b90ff2ce3cef85e4 (patch) | |
tree | 35042c9a783cc668d2dab4fa0e9166736d50acf5 /lib/CodeGen/CodeGenTypes.h | |
parent | bd1099efde211cbb63fce3feee4ebcc6bac58781 (diff) |
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h index 925b933fca..0f6e51d1d3 100644 --- a/lib/CodeGen/CodeGenTypes.h +++ b/lib/CodeGen/CodeGenTypes.h @@ -113,13 +113,15 @@ class CodeGenTypes { llvm::FoldingSet<CGFunctionInfo> FunctionInfos; public: - class BitFieldInfo { - public: - explicit BitFieldInfo(unsigned short B, unsigned short S) - : Begin(B), Size(S) {} - - unsigned short Begin; - unsigned short Size; + struct BitFieldInfo { + BitFieldInfo(unsigned FieldNo, + unsigned Start, + unsigned Size) + : FieldNo(FieldNo), Start(Start), Size(Size) {} + + unsigned FieldNo; + unsigned Start; + unsigned Size; }; private: @@ -188,10 +190,11 @@ public: public: // These are internal details of CGT that shouldn't be used externally. /// addFieldInfo - Assign field number to field FD. - void addFieldInfo(const FieldDecl *FD, unsigned No); + void addFieldInfo(const FieldDecl *FD, unsigned FieldNo); /// addBitFieldInfo - Assign a start bit and a size to field FD. - void addBitFieldInfo(const FieldDecl *FD, unsigned Begin, unsigned Size); + void addBitFieldInfo(const FieldDecl *FD, unsigned FieldNo, + unsigned Start, unsigned Size); /// getBitFieldInfo - Return the BitFieldInfo that corresponds to the field /// FD. |