This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Move constexpr <cstring> functions into their own headers and remove unused <cstring> includes
ClosedPublic

Authored by philnik on Feb 4 2023, 3:21 PM.

Details

Diff Detail

Event Timeline

philnik created this revision.Feb 4 2023, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2023, 3:21 PM
philnik requested review of this revision.Feb 4 2023, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2023, 3:21 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik updated this revision to Diff 494872.Feb 5 2023, 1:33 AM

Generate files

philnik updated this revision to Diff 494874.Feb 5 2023, 1:45 AM

Try to fix CI

philnik updated this revision to Diff 494883.Feb 5 2023, 2:19 AM

Try to fix CI

Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2023, 2:19 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision.Feb 5 2023, 4:20 AM

LGTM, modulo the naming of the file.

libcxx/include/__string/constexpr_c_functions.h
11

I would name the file constexpr_c_functions.h, these are all private functions and not C functions, so the current name is slightly misleading.

libcxx/test/libcxx/transitive_includes/cxx20.csv
341

Since <format> isn't stable yet, I agree this is fine.

philnik marked an inline comment as done.Feb 6 2023, 9:35 AM
philnik added inline comments.
libcxx/include/__string/constexpr_c_functions.h
11

I'm a bit confused. I guess you would like a different name, but your suggestion is identical to the current name. Did you forget to replace the name?

ldionne accepted this revision.Feb 16 2023, 9:51 AM

LGTM, please make sure Mark didn't have another name in mind. I personally am fine with this name or any other reasonable name.

This revision is now accepted and ready to land.Feb 16 2023, 9:51 AM
Mordante added inline comments.Feb 17 2023, 8:56 AM
libcxx/include/__string/constexpr_c_functions.h
11

I'm a bit confused. I guess you would like a different name, but your suggestion is identical to the current name. Did you forget to replace the name?

Copy-paste error ;-)

I would name the file constexpr_functions.h, these are all private functions and not C functions, so the current name is slightly misleading.

philnik added inline comments.Feb 17 2023, 9:12 AM
libcxx/include/__string/constexpr_c_functions.h
11

I see your point, but I think constexpr_functions.h is very open. If you just read the name you would ask "What functions?". Although I admit that you could also read constexpr_c_functions.h as "all the C functions that are constexpr", I think it's closer to a good name. In case anybody has other suggestions we can still rename the file later.

philnik updated this revision to Diff 498403.Feb 17 2023, 9:15 AM

Try to fix CI

philnik updated this revision to Diff 498581.Feb 18 2023, 5:48 AM

Try to fix CI

philnik updated this revision to Diff 498846.Feb 20 2023, 7:04 AM

Try to fix CI

This revision was landed with ongoing or failed builds.Feb 21 2023, 7:56 AM
This revision was automatically updated to reflect the committed changes.