Skip to content

[CFIFixup] Add a default constructor to BlockFlags (NFC) #125296

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
Feb 1, 2025

Conversation

kazutakahirata
Copy link
Contributor

@kazutakahirata kazutakahirata commented Jan 31, 2025

This patch adds a default constructor to BlockFlags to initialize its
members to false, placing initializers close to the member
declarations.

Note that once C++20 is available in our codebase, we can replace
the explicit default constructor with:

bool Reachable : 1 = true;
:

This patch adds a default constructor to BlockFlags to initialize its
members to false, placing initializers close to the member
declarations.

Note that once C++20 is available in our codebase, we can eliminate
the explicit default constructor with:

  bool Reachable : 1 = true;
  :
Copy link
Contributor

@dhoekwater dhoekwater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice call. This is definitely cleaner and less error-prone.

@kazutakahirata kazutakahirata merged commit 7271681 into llvm:main Feb 1, 2025
9 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_cfi2 branch February 1, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants