[cfe-commits] r46859 - in /cfe/trunk: CodeGen/CGExpr.cpp CodeGen/CodeGenTypes.cpp test/CodeGen/bitfield.c
Eli Friedman
eli.friedman at gmail.com
Thu Feb 7 12:05:06 PST 2008
On Feb 7, 2008 11:29 AM, Lauro Ramos Venancio <lauro.venancio at gmail.com> wrote:
> + if (Field->isBitField()) {
> + const llvm::Type * FieldTy = ConvertType(Field->getType());
> + const llvm::PointerType * BaseTy =
> + cast<llvm::PointerType>(BaseValue->getType());
> + unsigned AS = BaseTy->getAddressSpace();
> + BaseValue = Builder.CreateBitCast(BaseValue,
> + llvm::PointerType::get(FieldTy, AS),
> + "tmp");
> + V = Builder.CreateGEP(BaseValue,
> + llvm::ConstantInt::get(llvm::Type::Int32Ty, idx),
> + "tmp");
Wow, this is going to be seriously painful to deal with for constant
initializers. Any particular suggestions there? (I suppose it was
going to be painful in any case, though.)
-Eli
More information about the cfe-commits
mailing list