This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Mark __u64toa and __u32toa as noexcept
ClosedPublic

Authored by ldionne on May 21 2020, 7:32 AM.

Details

Reviewers
mclow.lists
Group Reviewers
Restricted Project
Commits
rG485b9083fe69: [libc++] Mark __u64toa and __u32toa as noexcept
Summary

The two functions don't throw, and the generated code is better when
we explicitly tell the compiler that the functions are noexcept. This
isn't an ABI break because the signatures of the functions stay the
same with or without noexcept.

https://llvm.org/PR46016

Diff Detail

Event Timeline

ldionne created this revision.May 21 2020, 7:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2020, 7:32 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
mclow.lists requested changes to this revision.May 21 2020, 7:50 AM

This is not sufficient; it just "moves the pain" from the callers code into the dylib. All the functions in charconv.cpp need to be marked as noexcept.

This revision now requires changes to proceed.May 21 2020, 7:50 AM
ldionne updated this revision to Diff 265516.May 21 2020, 9:08 AM

Mark all functions in charconv.cpp as noexcept

This is not sufficient; it just "moves the pain" from the callers code into the dylib. All the functions in charconv.cpp need to be marked as noexcept.

Excellent point.

mclow.lists accepted this revision.May 21 2020, 4:15 PM

LGTM. Feel free to ignore the clang-format whining.

This revision is now accepted and ready to land.May 21 2020, 4:15 PM
This revision was automatically updated to reflect the committed changes.