This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][test][profile] Fix missing include
ClosedPublic

Authored by jroelofs on Jul 20 2020, 4:00 PM.

Details

Summary

... on systems where wait() isn't one of the declarations transitively included via unistd.h.

Diff Detail

Event Timeline

jroelofs created this revision.Jul 20 2020, 4:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2020, 4:00 PM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
MaskRay added inline comments.Jul 20 2020, 4:06 PM
compiler-rt/test/profile/Posix/gcov-fork.c
13

No need for #if

sys/wait.h is specified by POSIX.

jroelofs marked an inline comment as done.Jul 21 2020, 7:31 AM
jroelofs added inline comments.
compiler-rt/test/profile/Posix/gcov-fork.c
13

Thanks. I wasn't sure.

jroelofs updated this revision to Diff 279521.Jul 21 2020, 7:32 AM

review feedback

jroelofs marked an inline comment as done.Jul 21 2020, 7:32 AM
MaskRay accepted this revision.Jul 21 2020, 9:48 AM

LGTM. Thanks for fixing it!

... on systems where wait() isn't one of the declarations transitively included via unistd.h.

Hope you can just be more specific about this - on which particular system wait() isn't transitively included via unistd.h
It conveys more information and helps posterity when they are reading the log.

This revision is now accepted and ready to land.Jul 21 2020, 9:48 AM
MaskRay added inline comments.Jul 21 2020, 9:48 AM
compiler-rt/test/profile/Posix/gcov-fork.c
12

Reorder the headers to pacify clang-format

LGTM. Thanks for fixing it!

... on systems where wait() isn't one of the declarations transitively included via unistd.h.

Hope you can just be more specific about this - on which particular system wait() isn't transitively included via unistd.h
It conveys more information and helps posterity when they are reading the log.

I think this was just Darwin 10.15. Not sure why our public bots didn't catch it.

This revision was automatically updated to reflect the committed changes.
jroelofs marked an inline comment as done.Jul 21 2020, 11:00 AM

Not sure why our public bots didn't catch it.

I also realized these tests don't run on green dragon. I'll look into setting that up.