This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add the implementation of the "remove" function.
ClosedPublic

Authored by sivachandra on Sep 15 2022, 1:30 AM.

Diff Detail

Event Timeline

sivachandra created this revision.Sep 15 2022, 1:30 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 15 2022, 1:30 AM
sivachandra requested review of this revision.Sep 15 2022, 1:30 AM
lntue added inline comments.Sep 15 2022, 6:59 AM
libc/src/stdio/linux/remove.cpp
24

In the implementation of linux/unlinkat, SYS_unlinkat is guarded: https://github.com/llvm/llvm-project/blob/main/libc/src/unistd/linux/unlinkat.cpp#L21
Do you need the same guard here?

sivachandra added inline comments.Sep 15 2022, 9:18 AM
libc/src/stdio/linux/remove.cpp
24

I think that example is being a bit too pedantic. We can remove it - if SYS_unlinkat is missing, there will be a compile failure providing equivalent information.

lntue accepted this revision.Sep 15 2022, 9:40 AM
This revision is now accepted and ready to land.Sep 15 2022, 9:40 AM