Skip to content

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