This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Re-add compile-time checks for SPI in HosInfoMacOSX
ClosedPublic

Authored by bulbazord on Aug 1 2023, 5:27 PM.

Details

Summary

There were some checks removed previously in
bc196970b549782bffde5fdbfa450c565af11fc1.

However, all these SPIs are actually defined in macOS 12 and onward, not
macOSX 10.12 as the previous commit would suggest. As a result, if you
have access to these SPIs lldb will fail to compile correctly.

Instead of adding back the __builtin_availability checks, it seems
easier just to check the minimum deployment target with Availability
macros.

Diff Detail

Event Timeline

bulbazord created this revision.Aug 1 2023, 5:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 5:27 PM
bulbazord requested review of this revision.Aug 1 2023, 5:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 5:27 PM
jasonmolenda accepted this revision.Aug 1 2023, 5:29 PM

Ah, I missed that I removed the check when we were trying to clean up old pre-macOS 10.12 ifdef's. LGTM thanks!

This revision is now accepted and ready to land.Aug 1 2023, 5:29 PM
JDevlieghere accepted this revision.Aug 1 2023, 5:43 PM