From dfddebcfb9fa9d756518015fd31cddcc9eb1459e Mon Sep 17 00:00:00 2001 From: Bradley Smith Date: Wed, 29 Apr 2015 14:32:06 +0000 Subject: Revert code changes made under r235976. This issue was fixed elsewhere in r235396 in a more general way, hence these changes no longer do anything. Keep the testcase however, to ensure that we don't regress this for ARM. llvm-svn: 236104 --- clang/lib/CodeGen/CodeGenModule.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 861a6ee..c517d17 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1799,23 +1799,6 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, D->getType().isConstant(Context) && isExternallyVisible(D->getLinkageAndVisibility().getLinkage())) GV->setSection(".cp.rodata"); - - // The ARM/AArch64 ABI expects structs with bitfields to respect the proper - // container alignment, hence we have to enfore this in the IR so as to - // work around clang combining bitfields into one large type. - if (getContext().getTargetInfo().enforceBitfieldContainerAlignment()) { - if (const auto *RT = D->getType()->getAs()) { - const RecordDecl *RD = RT->getDecl(); - - for (auto I = RD->field_begin(), End = RD->field_end(); I != End; ++I) { - if ((*I)->isBitField()) { - const ASTRecordLayout &Info = getContext().getASTRecordLayout(RD); - GV->setAlignment(Info.getAlignment().getQuantity()); - break; - } - } - } - } } if (AddrSpace != Ty->getAddressSpace()) -- cgit v1.1