aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index 9dc1764..eb727c5 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -160,10 +160,7 @@ static bool lowerObjCCall(Function &F, const char *NewFn,
auto *CB = cast<CallBase>(U.getUser());
if (CB->getCalledFunction() != &F) {
- objcarc::ARCInstKind Kind = objcarc::getAttachedARCFunctionKind(CB);
- (void)Kind;
- assert((Kind == objcarc::ARCInstKind::RetainRV ||
- Kind == objcarc::ARCInstKind::UnsafeClaimRV) &&
+ assert(objcarc::getAttachedARCFunction(CB) == &F &&
"use expected to be the argument of operand bundle "
"\"clang.arc.attachedcall\"");
U.set(FCache.getCallee());
@@ -529,6 +526,9 @@ bool PreISelIntrinsicLowering::lowerIntrinsics(Module &M) const {
case Intrinsic::objc_retainAutoreleasedReturnValue:
Changed |= lowerObjCCall(F, "objc_retainAutoreleasedReturnValue");
break;
+ case Intrinsic::objc_claimAutoreleasedReturnValue:
+ Changed |= lowerObjCCall(F, "objc_claimAutoreleasedReturnValue");
+ break;
case Intrinsic::objc_retainBlock:
Changed |= lowerObjCCall(F, "objc_retainBlock");
break;