From 2f947fd6971e284ebc0f38219c1687afa15d73b0 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 16 Jul 2025 14:41:31 -0400 Subject: [WARP] Construct a minimal version of the function object when user only wants the symbol We were previously constructing the function type, comments and variables to just throw away, wasting precious cpu cycles! --- plugins/warp/src/processor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/warp/src/processor.rs') diff --git a/plugins/warp/src/processor.rs b/plugins/warp/src/processor.rs index d3ccb300..75e8569e 100644 --- a/plugins/warp/src/processor.rs +++ b/plugins/warp/src/processor.rs @@ -816,11 +816,11 @@ impl WarpFileProcessor { .filter_map(|func| { let lifted_il = func.lifted_il().ok()?; let target = platform_to_target(&func.platform()); - let mut built_function = build_function(&func, &lifted_il); - // User asked to only save symbols, so we will remove the function type. - if self.file_data == FileDataKindField::Symbols { - built_function.ty = None; - } + let built_function = build_function( + &func, + &lifted_il, + self.file_data == FileDataKindField::Symbols, + ); Some((target, built_function)) }) .fold( -- cgit v1.3.1