mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
C stdlib headers are part of "Darwin"/"Glibc" clang module. If a Swift file imports a bridging headers and that has '#include' C stdlib headers, Swift compiler implicitly imports "Darwin"/"Glibc" overlay modules. That violates dependency layering. I.e. Compiler depends on Darwin overlay, Darwin overlay is created by the compiler. rdar://107957117
56 lines
2.0 KiB
C
56 lines
2.0 KiB
C
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift open source project
|
|
//
|
|
// Copyright (c) 2023 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_PLUGINSERVER_PLUGINSERVER_H
|
|
#define SWIFT_PLUGINSERVER_PLUGINSERVER_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Inter-process communication.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// Create an IPC communication handle.
|
|
const void *PluginServer_createConnection(const char **errorMessage);
|
|
|
|
/// Destroy an IPC communication handle created by
|
|
/// 'PluginServer_createConnection'.
|
|
void PluginServer_destroyConnection(const void *connHandle);
|
|
|
|
/// Read bytes from the IPC communication handle.
|
|
long PluginServer_read(const void *connHandle, void *data, unsigned long nbyte);
|
|
|
|
/// Write bytes to the IPC communication handle.
|
|
long PluginServer_write(const void *connHandle, const void *data,
|
|
unsigned long nbyte);
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Dynamic link
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// Load a dynamic link library, and return the handle.
|
|
void *PluginServer_dlopen(const char *filename, const char **errorMessage);
|
|
|
|
/// Resolve a type metadata by a pair of the module name and the type name.
|
|
/// 'libraryHint' is a
|
|
const void *PluginServer_lookupMacroTypeMetadataByExternalName(
|
|
const char *moduleName, const char *typeName, void *libraryHint,
|
|
const char **errorMessage);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* SWIFT_PLUGINSERVER_PLUGINSERVER_H */
|