This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Remove conditional checking for macosx 10.5
AbandonedPublic

Authored by ldionne on Sep 23 2021, 5:52 AM.

Details

Reviewers
benlangmuir
Summary

Back-deploying to macOS 10.5 is not supported anymore, so I don't think
anybody's really using that code path. Removing the conditional logic
allows for a small code simplification.

Diff Detail

Event Timeline

ldionne created this revision.Sep 23 2021, 5:52 AM
ldionne requested review of this revision.Sep 23 2021, 5:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2021, 5:52 AM
benlangmuir requested changes to this revision.Sep 23 2021, 7:22 AM
benlangmuir added inline comments.
llvm/lib/Support/LockFileManager.cpp
38

gethostuuid is not available on all Apple platforms, so we should still check for macOS specifically. It looks like some other code is using this pattern to check the platform:

#if defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_OSX
...
This revision now requires changes to proceed.Sep 23 2021, 7:22 AM
dexonsmith added inline comments.Sep 23 2021, 8:24 AM
llvm/lib/Support/LockFileManager.cpp
38

Smaller change would be to drop the __MAC_OS_X_VERSION_MIN_REQUIRED > 1050 check (avoids adding an extra include)... but in either case this doesn't buy us much, since we still need some sort of USE_OSX_GETHOSTUUID flag. If the goal is to remove use of libc++'s __MAC_OS_X_VERSION_MIN_REQUIRED, this could switch to the compiler-provided __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__...

ldionne abandoned this revision.Sep 23 2021, 9:01 AM
ldionne added inline comments.
llvm/lib/Support/LockFileManager.cpp
38

Yeah, that's what I did in D110289. I thought I could simplify it further but it looks like there isn't much that can be done, so I'll abandon this.