Skip to content

Conversation

@ahatanak
Copy link
Collaborator

This fixes a bug where hasCFGChanged was called before CFGChanged had been initialized.

rdar://142842745

This fixes a bug where hasCFGChanged was called before CFGChanged had
been initialized.

rdar://142842745
@llvmbot
Copy link
Member

llvmbot commented Jan 31, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Akira Hatanaka (ahatanak)

Changes

This fixes a bug where hasCFGChanged was called before CFGChanged had been initialized.

rdar://142842745


Full diff: https://github.com/llvm/llvm-project/pull/125256.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp (+1-1)
diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
index 8407726a69c0ba..311d3b1cfc0a05 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
@@ -64,7 +64,7 @@ namespace {
 
 class ObjCARCContract {
   bool Changed;
-  bool CFGChanged;
+  bool CFGChanged = false;
   AAResults *AA;
   DominatorTree *DT;
   ProvenanceAnalysis PA;

@ahatanak ahatanak merged commit 833ba0a into llvm:main Jan 31, 2025
10 checks passed
@ahatanak ahatanak deleted the init-objc-contract-cfg-changed branch January 31, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants