Allow specifying NOT-passes on the command line

This commit is contained in:
moxian 2025-03-30 19:12:10 -07:00 committed by nora
parent d023307d8d
commit 2efee491b5
3 changed files with 34 additions and 10 deletions

View file

@ -18,7 +18,7 @@ const PASS_NAME: &str = "delete-unused-functions";
impl Minimizer {
pub fn delete_dead_code(&mut self) -> Result<()> {
if self.pass_disabled(PASS_NAME) {
if !self.pass_enabled(PASS_NAME) {
return Ok(());
}