Skip to content

[sil] Fix the no-asserts build by not calling a ifndef NDEBUG method. #69652

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

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Nov 3, 2023

Just fixing the build.

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 3, 2023

@swift-ci smoke test

@meg-gupta
Copy link
Contributor

@swift-ci test windows platform

@gottesmm gottesmm merged commit 3d0ec7a into swiftlang:main Nov 6, 2023
@gottesmm gottesmm deleted the pr-0890d2464f674c0b72231fd2e4a9c1c871685b56 branch November 6, 2023 00:21
@@ -1392,7 +1392,11 @@ class BlockPartitionState {
void print(llvm::raw_ostream &os) const {
os << SEP_STR << "BlockPartitionState[reached=" << reached
<< ", needsUpdate=" << needsUpdate << "]\nid: ";
#ifndef NDEBUG
basicBlock->printID(os);
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a couple more succ->printID(os) and pred->printID(os) in lines 1412 and 1417. Don't those need to be protected for NDEBUG builds too?

drodriguez added a commit to drodriguez/swift that referenced this pull request Nov 8, 2023
…(part 2)

PR swiftlang#69652 protected one call of `printID` but left another two in the
file. Create two small lambdas to print the ID with `printID` or just
print `NOASSERTS` depending on `NDEBUG` being defined. Change all the
callsites of `printID` to use that lambda.
drodriguez added a commit that referenced this pull request Nov 8, 2023
…(part 2) (#69716)

PR #69652 protected one call of `printID` but left another two in the
file. Create two small lambdas to print the ID with `printID` or just
print `NOASSERTS` depending on `NDEBUG` being defined. Change all the
callsites of `printID` to use that lambda.
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.

3 participants