[ASTGen] Avoid including C standard libary headers in brigdging headers

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
This commit is contained in:
Rintaro Ishizaki
2023-04-12 15:10:51 -07:00
parent 2bcef82eb5
commit fe1eb469e4
9 changed files with 102 additions and 94 deletions

View File

@@ -13,8 +13,6 @@
#ifndef SWIFT_PLUGINSERVER_PLUGINSERVER_H
#define SWIFT_PLUGINSERVER_PLUGINSERVER_H
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -31,11 +29,11 @@ const void *PluginServer_createConnection(const char **errorMessage);
void PluginServer_destroyConnection(const void *connHandle);
/// Read bytes from the IPC communication handle.
ssize_t PluginServer_read(const void *connHandle, void *data, size_t nbyte);
long PluginServer_read(const void *connHandle, void *data, unsigned long nbyte);
/// Write bytes to the IPC communication handle.
ssize_t PluginServer_write(const void *connHandle, const void *data,
size_t nbyte);
long PluginServer_write(const void *connHandle, const void *data,
unsigned long nbyte);
//===----------------------------------------------------------------------===//
// Dynamic link