diff options
author | Anders Carlsson <andersca@mac.com> | 2010-06-03 15:36:07 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-06-03 15:36:07 +0000 |
commit | e9a05b7fd6ece68310707d10bc747a702a9af4a8 (patch) | |
tree | 42c1ecf698feb7112821ee40400add0565919091 /lib/CodeGen/CGExprConstant.cpp | |
parent | d6db976dd4c48b556862d093fb564b9cbc09aae3 (diff) |
Don't try to explicitly zero out bit-fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 21a2a605a4..a145a66b59 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -1117,6 +1117,11 @@ llvm::Constant *CodeGenModule::EmitNullConstant(QualType T) { for (RecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end(); I != E; ++I) { const FieldDecl *FD = *I; + + // Ignore bit fields. + if (FD->isBitField()) + continue; + unsigned FieldNo = Layout.getLLVMFieldNo(FD); Elements[FieldNo] = EmitNullConstant(FD->getType()); } |