From 34d02d0b37f16015f317a935c48ce8b7b64ae77b Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 15 Dec 2009 18:49:47 +0000 Subject: Update clang to 91430. --- lib/CodeGen/CGExprConstant.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 9289f78d557a..d428983f012a 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -167,7 +167,11 @@ class ConstStructBuilder { } // Or in the bits that go into the previous byte. - Tmp |= cast(Elements.back())->getValue(); + if (llvm::ConstantInt *Val = dyn_cast(Elements.back())) + Tmp |= Val->getValue(); + else + assert(isa(Elements.back())); + Elements.back() = llvm::ConstantInt::get(CGM.getLLVMContext(), Tmp); if (FitsCompletelyInPreviousByte) -- cgit v1.2.3