This is an archive of the discontinued LLVM Phabricator instance.

[libc] Change UInt integer conversion operators to use standard types.
ClosedPublic

Authored by lntue on May 23 2023, 10:36 AM.

Details

Summary

This fixes an issue with missing unsigned long conversion on macOS.

Diff Detail

Event Timeline

lntue created this revision.May 23 2023, 10:36 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 23 2023, 10:36 AM
lntue requested review of this revision.May 23 2023, 10:36 AM
This revision is now accepted and ready to land.May 23 2023, 10:58 AM
michaelrj added inline comments.May 23 2023, 10:59 AM
libc/src/__support/UInt.h
80–86

nit: it might be best to have both the uint and the standard int types for casting

lntue added inline comments.May 23 2023, 11:12 AM
libc/src/__support/UInt.h
80–86

Adding other uint overload will actually cause ambiguity, as they are simply aliases of these on many platforms. We had similar issues when adding built-in wrappers https://github.com/llvm/llvm-project/blob/main/libc/src/__support/builtin_wrappers.h