diff options
| author | Mark Rowe <mark@vector35.com> | 2026-03-23 19:34:55 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-03-30 09:19:20 -0700 |
| commit | efbde23abcf1f38d98a096044e2256c5619f9004 (patch) | |
| tree | 2c5d910ef3c2215431e3e112779ab2f203de7d84 /plugins/workflow_objc/src/workflow.rs | |
| parent | dca922496f96d18f9060b1f7a349ecb5c1c1a9a1 (diff) | |
[ObjC] Propagate types from objc_alloc_init and friends
Diffstat (limited to 'plugins/workflow_objc/src/workflow.rs')
| -rw-r--r-- | plugins/workflow_objc/src/workflow.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/workflow_objc/src/workflow.rs b/plugins/workflow_objc/src/workflow.rs index fdda1d45..8c52e0f4 100644 --- a/plugins/workflow_objc/src/workflow.rs +++ b/plugins/workflow_objc/src/workflow.rs @@ -7,6 +7,7 @@ use crate::{activities, error::WorkflowRegistrationError}; #[repr(u8)] pub enum Confidence { ObjCMsgSend = 96, + AllocInit = 98, SuperInit = 100, } @@ -50,6 +51,19 @@ pub fn register_activities() -> Result<(), WorkflowRegistrationError> { run(activities::inline_stubs::process), ); + let alloc_init_activity = Activity::new_with_action( + activity::Config::action( + "core.function.objectiveC.types.allocInit", + "Obj-C: Adjust return types of objc_alloc_init calls", + "Adjust the return type of calls to objc_alloc / objc_alloc_init when a fixed type is passed as an argument.", + ) + .eligibility( + activity::Eligibility::auto().predicate( + activity::ViewType::in_(["Mach-O", "DSCView"]), + )), + run(activities::alloc_init::process), + ); + let super_init_activity = Activity::new_with_action( activity::Config::action( "core.function.objectiveC.types.superInit", @@ -85,7 +99,8 @@ pub fn register_activities() -> Result<(), WorkflowRegistrationError> { &remove_memory_management_activity, "core.function.generateMediumLevelIL", )? - .activity_after(&super_init_activity, "core.function.generateMediumLevelIL")? + .activity_after(&alloc_init_activity, "core.function.generateMediumLevelIL")? + .activity_after(&super_init_activity, &alloc_init_activity.name())? .register()?; Ok(()) |
