diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 150450e..e1e1ad7 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -3447,9 +3447,9 @@ static llvm::Value *tryRemoveRetainOfSelf(CodeGenFunction &CGF, const VarDecl *self = method->getSelfDecl(); if (!self->getType().isConstQualified()) return nullptr; - // Look for a retain call. Note: stripPointerCasts looks through returned arg - // functions, which would cause us to miss the retain. - llvm::CallInst *retainCall = dyn_cast<llvm::CallInst>(result); + // Look for a retain call. + llvm::CallInst *retainCall = + dyn_cast<llvm::CallInst>(result->stripPointerCasts()); if (!retainCall || retainCall->getCalledOperand() != CGF.CGM.getObjCEntrypoints().objc_retain) return nullptr; |