Skip to content

[ObjC][ARC] Initialize member of ObjCARCContract #125256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2025

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