From 77212133072dc40f070a280af8217032f55a9eb4 Mon Sep 17 00:00:00 2001 From: rdivacky 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 9289f78..d428983 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.1