Skip to content

[Swift next] Fixes for APInt::toString API changes #38110

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

Conversation

etcwilde
Copy link
Member

@etcwilde etcwilde commented Jun 25, 2021

The APInt::toString API changed and no longer has an overload to return a std::string.
Instead, you have to pass the memory buffer in directly.
Also ran git clang-format on the commit, which had some fun with the include ordering. :)

rdar://79746541

etcwilde added 2 commits June 24, 2021 17:05
The toString has been updated so that it doesn't return a std::string
anymore. Instead, you have to pass the memory buffer in. This patch
cleans that up.
Just went through and updated the rest of the APInt toString calls.
This should take care of them, I hope.
@etcwilde etcwilde merged commit 154d10f into swiftlang:next Jun 25, 2021
Ty = cast<IntegerLiteralInst>(&SI)->getType();
break;
case SILInstructionKind::FloatLiteralInst:
Str = cast<FloatLiteralInst>(&SI)->getBits().toString(16,
/*Signed*/false);
cast<IntegerLiteralInst>(&SI)->getValue().toString(Str, 16,
Copy link
Member Author

Choose a reason for hiding this comment

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

🐛

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.

1 participant