[cfe-commits] r90876 - /cfe/trunk/lib/CodeGen/CGExprConstant.cpp
Nuno Lopes
nunoplopes at sapo.pt
Tue Dec 8 15:36:44 PST 2009
Oh, sorry for the breakage. I didn't notice this failure.
Thanks for fixing it,
Nuno
----- Original Message -----
> Author: ddunbar
> Date: Tue Dec 8 15:12:32 2009
> New Revision: 90876
>
> URL: http://llvm.org/viewvc/llvm-project?rev=90876&view=rev
> Log:
> Update CGExprConstant for change to emit padding values as undef.
> - This fixes 2003-05-21-BitfieldHandling.
>
> Modified:
> cfe/trunk/lib/CodeGen/CGExprConstant.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=90876&r1=90875&r2=90876&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Tue Dec 8 15:12:32 2009
> @@ -167,7 +167,11 @@
> }
>
> // Or in the bits that go into the previous byte.
> - Tmp |= cast<llvm::ConstantInt>(Elements.back())->getValue();
> + if (llvm::ConstantInt *Val =
> dyn_cast<llvm::ConstantInt>(Elements.back()))
> + Tmp |= Val->getValue();
> + else
> + assert(isa<llvm::UndefValue>(Elements.back()));
> +
> Elements.back() = llvm::ConstantInt::get(CGM.getLLVMContext(), Tmp);
>
> if (FitsCompletelyInPreviousByte)
More information about the cfe-commits
mailing list