From: Fariborz Jahanian Date: Tue, 27 Jan 2009 22:27:56 +0000 (+0000) Subject: After talking to our runtime guru, I added a comment. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07236ba8d3cf1d2aa8cd173c440f3e7dc1249fd0;p=clang After talking to our runtime guru, I added a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63141 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index eef74083da..eb26a95807 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -3562,6 +3562,11 @@ llvm::Constant *CGObjCNonFragileABIMac::EmitIvarList( Field->getType().getTypePtr()) >> 3; Align = llvm::Log2_32(Align); Ivar[3] = llvm::ConstantInt::get(ObjCTypes.IntTy, Align); + // NOTE. Size of a bitfield does not match gcc's, because of the way + // bitfields are treated special in each. But I am told that 'size' + // for bitfield ivars is ignored by the runtime so it does not matter. + // (even if it matters, some day, there is enough info. to get the bitfield + // right! Ivar[4] = llvm::ConstantInt::get(ObjCTypes.IntTy, Size); Ivars.push_back(llvm::ConstantStruct::get(ObjCTypes.IvarnfABITy, Ivar)); }