Availability

This commit is contained in:
Robert Widmann
2024-02-08 03:27:29 -07:00
committed by Robert Widmann
parent 6da33336d3
commit ea49d13a12
3 changed files with 10 additions and 4 deletions

View File

@@ -1032,7 +1032,11 @@ ModuleDecl *
ASTBuilder::findModule(NodePointer node) {
assert(node->getKind() == Demangle::Node::Kind::Module);
const auto moduleName = node->getText();
// Respect the main module's ABI name when we're trying to resolve
// mangled names. But don't touch anything under the Swift stdlib's
// umbrella.
if (Ctx.MainModule && Ctx.MainModule->getABIName().is(moduleName))
if (!Ctx.MainModule->getABIName().is(STDLIB_NAME))
return Ctx.MainModule;
return Ctx.getModuleByName(moduleName);

View File

@@ -3,16 +3,21 @@
import Swift
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public protocol Aspect {
associatedtype Orientation : Bottom.Aspect
var orientation: Self.Orientation { get }
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public struct Parameter {
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public struct ReferencesTop {
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func orientation(of parameter: Bottom.Parameter) -> some Bottom.Aspect
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public typealias Orientation = @_opaqueReturnTypeOf("$s3Top13ReferencesTopV11orientation2ofQrAA9ParameterV_tF", 0) __
}

View File

@@ -1,3 +0,0 @@
#!/bin/sh
/Users/rwidmann/SwiftInternal/build/Ninja-Release/swift-macosx-arm64/bin/swift-frontend -sdk $(xcrun --show-sdk-path) -compile-module-from-interface -module-name Bottom -o Bottom.swiftmodule Bottom.swiftinterface -verify