- This fixes 2003-05-21-BitfieldHandling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90876
91177308-0d34-0410-b5e6-
96231b3b80d8
}
// 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)