From b2debeb96da2b1d47ecffddbc35ade97b64af1c2 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Tue, 8 Dec 2009 01:29:31 +0000 Subject: [PATCH] Fixup catch parameters with class reference type. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90821 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGException.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index 829f114411..88e7eb5e5c 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -189,7 +189,7 @@ static void CopyObject(CodeGenFunction &CGF, const Expr *E, llvm::Value *N) { static void CopyObject(CodeGenFunction &CGF, QualType ObjectType, bool WasPointer, llvm::Value *E, llvm::Value *N) { // Store the throw exception in the exception object. - if (!CGF.hasAggregateLLVMType(ObjectType)) { + if (WasPointer || !CGF.hasAggregateLLVMType(ObjectType)) { llvm::Value *Value = E; if (!WasPointer) Value = CGF.Builder.CreateLoad(Value); -- 2.40.0