diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-26 16:46:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-26 16:46:50 +0000 |
commit | c00d8e18ad3d903acfeb5d05163ce90713066a3f (patch) | |
tree | 3b6657d3c7123fe161c4a4d0c9a4973e16208f1c /lib/CodeGen/CGObjCMac.cpp | |
parent | 087fb7d0b5e08f34b2e28a09c376f66449f30886 (diff) |
Make the static type of the exception variable in an Objective-C
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 62e7900533..3905bd4f3d 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -2670,7 +2670,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, const ObjCAtCatchStmt *CatchStmt = AtTryStmt->getCatchStmt(I); llvm::BasicBlock *NextCatchBlock = CGF.createBasicBlock("catch"); - const ParmVarDecl *CatchParam = CatchStmt->getCatchParamDecl(); + const VarDecl *CatchParam = CatchStmt->getCatchParamDecl(); const ObjCObjectPointerType *OPT = 0; // catch(...) always matches. @@ -5562,13 +5562,13 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, SelectorArgs.push_back(ObjCTypes.getEHPersonalityPtr()); // Construct the lists of (type, catch body) to handle. - llvm::SmallVector<std::pair<const ParmVarDecl*, const Stmt*>, 8> Handlers; + llvm::SmallVector<std::pair<const VarDecl*, const Stmt*>, 8> Handlers; bool HasCatchAll = false; if (isTry) { const ObjCAtTryStmt &AtTry = cast<ObjCAtTryStmt>(S); for (unsigned I = 0, N = AtTry.getNumCatchStmts(); I != N; ++I) { const ObjCAtCatchStmt *CatchStmt = AtTry.getCatchStmt(I); - const ParmVarDecl *CatchDecl = CatchStmt->getCatchParamDecl(); + const VarDecl *CatchDecl = CatchStmt->getCatchParamDecl(); Handlers.push_back(std::make_pair(CatchDecl, CatchStmt->getCatchBody())); // catch(...) always matches. @@ -5618,7 +5618,7 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, SelectorArgs.begin(), SelectorArgs.end(), "selector"); for (unsigned i = 0, e = Handlers.size(); i != e; ++i) { - const ParmVarDecl *CatchParam = Handlers[i].first; + const VarDecl *CatchParam = Handlers[i].first; const Stmt *CatchBody = Handlers[i].second; llvm::BasicBlock *Next = 0; |