From 077dc605405e9aeacf10056976f78e5d247ff457 Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 29 Oct 2010 08:14:02 +0000 Subject: Don't assert on attempts to throw 'bool'. I wonder if in the history of C++ anyone has ever intentionally done this outside of a compiler test case. llvm-svn: 117645 --- clang/lib/CodeGen/CGException.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGException.cpp') diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 79646f3316b..cb7bad25756 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -526,7 +526,7 @@ static void EmitAnyExprToExn(CodeGenFunction &CGF, const Expr *E, // __cxa_allocate_exception returns a void*; we need to cast this // to the appropriate type for the object. - const llvm::Type *Ty = CGF.ConvertType(E->getType())->getPointerTo(); + const llvm::Type *Ty = CGF.ConvertTypeForMem(E->getType())->getPointerTo(); llvm::Value *TypedExnLoc = CGF.Builder.CreateBitCast(ExnLoc, Ty); // FIXME: this isn't quite right! If there's a final unelided call -- cgit v1.2.3