]> granicus.if.org Git - clang/commitdiff
Fixup catch parameters with class reference type. WIP.
authorMike Stump <mrs@apple.com>
Tue, 8 Dec 2009 01:29:31 +0000 (01:29 +0000)
committerMike Stump <mrs@apple.com>
Tue, 8 Dec 2009 01:29:31 +0000 (01:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90821 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGException.cpp

index 829f11441139475a2a9535e3fcf5f226e54b4354..88e7eb5e5c039704fa5d4fb2bf7087ef4a11fc42 100644 (file)
@@ -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);