aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorRyosuke Niwa <rniwa@webkit.org>2025-04-27 14:24:32 -0700
committerGitHub <noreply@github.com>2025-04-27 14:24:32 -0700
commit16e5c3ddadaa8d25698a71c0308b1d0ca887d11f (patch)
tree1aee0a380f1e91d7cbf49af1e3e0f26d0a542fcb /llvm/lib/CodeGen/MachineBlockPlacement.cpp
parent08beaa868ecc4846755f8679a68e79f4642b268b (diff)
downloadllvm-16e5c3ddadaa8d25698a71c0308b1d0ca887d11f.zip
llvm-16e5c3ddadaa8d25698a71c0308b1d0ca887d11f.tar.gz
llvm-16e5c3ddadaa8d25698a71c0308b1d0ca887d11f.tar.bz2
[alpha.webkit.RetainPtrCtorAdoptChecker] An assortment of small enhancements (#135329)
This PR implements various small enhancements to alpha.webkit.RetainPtrCtorAdoptChecker: - Detect leaks from [[X alloc] init] when ARC is disabled. - Detect leaks from calling Create, Copy, and other +1 CF functions. - Recognize [allocX() init] pattern where allocX is a C/C++ function. - Recognize _init in addition to init as an init function. - Recognize [[[X alloc] init] autorelease]. - Recognize CFBridgingRelease. - Support CF_RETRUNS_RETAINED on out arguments of a C function. - Support returning +1 object in Create, Copy, and other +1 functions or +1 selectors. - Support variadic Create, Copy, and other +1 C/C++ functions. To make these enhancements, this PR introduces new visit functions for ObjCMessageExpr, ReturnStmt, VarDecl, and BinaryOperator. These functions look for a specific construct mentioned above and adds an expression such as [[X alloc] init] or CreateX to a DenseSet CreateOrCopyFnCall when the expression does not result in leaks. When the code to detect leaks such as the one in visitObjCMessageExpr later encounters this expression, it can bail out early if the expression is in the set.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
0 files changed, 0 insertions, 0 deletions