Commit Graph

1 Commits

Author SHA1 Message Date
Slava Pestov
30f038a598 Sema: Allow @objc enums without -enable-objc-interop or importing Foundation
We used to allow @objc enums on Linux, where Objective-C interop is disabled,
because the check first looked for an import of the Foundation module
(which could be the non-Objective-C corelibs-foundation) before checking
if Objective-C interop was enabled.

Since @objc enums don't actually depend on Foundation or Objective-C and
only have a different layout in IRGen, let's bring back and formalize the
old behavior.

Fixes https://bugs.swift.org/browse/SR-14548 / rdar://problem/77325078.
2021-05-26 21:59:20 -04:00