This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Get rid of HAVE_SYS_TYPES_H
ClosedPublic

Authored by thakis on Aug 3 2021, 3:56 AM.

Details

Summary

LLVM includes this header unconditionally on all platforms
(including Windows), so this define should no longer be necessary.

No behavior change.

Diff Detail

Event Timeline

thakis created this revision.Aug 3 2021, 3:56 AM
thakis requested review of this revision.Aug 3 2021, 3:56 AM
thakis updated this revision to Diff 363685.Aug 3 2021, 4:00 AM

Remove Config.h include from driver/Platform.h. Platform.h only gets included in 5 files, and I checked that none of those need Config.h.

teemperor accepted this revision.Aug 3 2021, 4:24 AM
teemperor added a subscriber: teemperor.

Thanks! This LGTM itself, but I would prefer if we could remove that define in this commit and remove the redundant Config.h includes in another (so, the first version of this patch LGTM).

Removing Config.h is always a bit icky as it will just silently disable all the #if feature code in case it's actually needed. IIUC you checked all the including files, but there are also downstream folks who will have probably an easier time bisecting potential fallout from this when it's a dedicated commit with a clear '[lldb] Remove redundant Config.h includes' as a title.

(Also unrelated: I think quite a few of the files here don't actually need anything from sys/types.h? We could probably just remove a bunch of this stuff all-together as a followup)

This revision is now accepted and ready to land.Aug 3 2021, 4:24 AM
This revision was automatically updated to reflect the committed changes.