Patch for objc's zero-const exception to not assume

that @catch(...) cathces all exceptions (c++ objects
are not cought by that).

llvm-svn: 77270
This commit is contained in:
Fariborz Jahanian 2009-07-27 23:12:41 +00:00
parent 30ab4a9fdc
commit e309b48a22
1 changed files with 10 additions and 11 deletions

View File

@ -5464,18 +5464,17 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
llvm::GlobalValue::ExternalLinkage,
0, "OBJC_EHTYPE_id");
SelectorArgs.push_back(IDEHType);
HasCatchAll = true;
break;
}
// All other types should be Objective-C interface pointer types.
const ObjCObjectPointerType *PT =
CatchDecl->getType()->getAsObjCObjectPointerType();
assert(PT && "Invalid @catch type.");
const ObjCInterfaceType *IT = PT->getInterfaceType();
assert(IT && "Invalid @catch type.");
llvm::Value *EHType = GetInterfaceEHType(IT->getDecl(), false);
SelectorArgs.push_back(EHType);
else {
// All other types should be Objective-C interface pointer types.
const ObjCObjectPointerType *PT =
CatchDecl->getType()->getAsObjCObjectPointerType();
assert(PT && "Invalid @catch type.");
const ObjCInterfaceType *IT = PT->getInterfaceType();
assert(IT && "Invalid @catch type.");
llvm::Value *EHType = GetInterfaceEHType(IT->getDecl(), false);
SelectorArgs.push_back(EHType);
}
}
}
}