Skip to content

Commit 3f1a3c7

Browse files
committed
[llvm-arc] Remove dead incorrect code.
The code I am ripping out was meant to look at the input argument, not the return value so was incorrect. Luckily this code was actually dead since whether or not we returned no capture or unknown, we bailed. Since the code is already dead, just rip it out.
1 parent 0540022 commit 3f1a3c7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/LLVMPasses/LLVMARCOpts.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,12 @@ static DtorKind analyzeDestructor(Value *P) {
649649
break;
650650
}
651651

652-
// Okay, the function has some side effects, if it doesn't capture the
653-
// object argument, at least that is something.
654-
return DtorFn->doesNotCapture(0) ? DtorKind::NoEscape : DtorKind::Unknown;
652+
// Okay, the function has some side effects.
653+
//
654+
// TODO: We could in the future return more accurate information by
655+
// checking if the function is able to capture the deinit parameter. We do
656+
// not do that today.
657+
return DtorKind::Unknown;
655658
}
656659
}
657660

0 commit comments

Comments
 (0)