summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGRecordLayout.h
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-04-06 15:53:59 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-04-06 15:53:59 +0000
commit71438373cd57f0d5d8c93bb5cf690844a0fbc9d0 (patch)
tree59c928209f8007777dd96568b026bdfe200691de /lib/CodeGen/CGRecordLayout.h
parentac616af773f5062edaaf1a0bb5610b49a22ac41f (diff)
downloadFreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.zip
FreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.tar.gz
Update clang to r100520.
Diffstat (limited to 'lib/CodeGen/CGRecordLayout.h')
-rw-r--r--lib/CodeGen/CGRecordLayout.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/CodeGen/CGRecordLayout.h b/lib/CodeGen/CGRecordLayout.h
index d0d8f98..fd1775e 100644
--- a/lib/CodeGen/CGRecordLayout.h
+++ b/lib/CodeGen/CGRecordLayout.h
@@ -19,6 +19,18 @@ namespace llvm {
namespace clang {
namespace CodeGen {
+class CGBitFieldInfo {
+public:
+ CGBitFieldInfo(unsigned FieldNo, unsigned Start, unsigned Size,
+ bool IsSigned)
+ : FieldNo(FieldNo), Start(Start), Size(Size), IsSigned(IsSigned) {}
+
+ unsigned FieldNo;
+ unsigned Start;
+ unsigned Size;
+ bool IsSigned : 1;
+};
+
/// CGRecordLayout - This class handles struct and union layout info while
/// lowering AST types to LLVM types.
///
@@ -29,18 +41,6 @@ class CGRecordLayout {
CGRecordLayout(const CGRecordLayout&); // DO NOT IMPLEMENT
void operator=(const CGRecordLayout&); // DO NOT IMPLEMENT
-public:
- struct BitFieldInfo {
- BitFieldInfo(unsigned FieldNo,
- unsigned Start,
- unsigned Size)
- : FieldNo(FieldNo), Start(Start), Size(Size) {}
-
- unsigned FieldNo;
- unsigned Start;
- unsigned Size;
- };
-
private:
/// The LLVMType corresponding to this record layout.
const llvm::Type *LLVMType;
@@ -51,7 +51,7 @@ private:
/// Map from (bit-field) struct field to the corresponding llvm struct type
/// field no. This info is populated by record builder.
- llvm::DenseMap<const FieldDecl *, BitFieldInfo> BitFields;
+ llvm::DenseMap<const FieldDecl *, CGBitFieldInfo> BitFields;
/// Whether one of the fields in this record layout is a pointer to data
/// member, or a struct that contains pointer to data member.
@@ -80,9 +80,9 @@ public:
/// \brief Return llvm::StructType element number that corresponds to the
/// field FD.
- const BitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const {
+ const CGBitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const {
assert(FD->isBitField() && "Invalid call for non bit-field decl!");
- llvm::DenseMap<const FieldDecl *, BitFieldInfo>::const_iterator
+ llvm::DenseMap<const FieldDecl *, CGBitFieldInfo>::const_iterator
it = BitFields.find(FD);
assert(it != BitFields.end() && "Unable to find bitfield info");
return it->second;
OpenPOWER on IntegriCloud