[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

@@ -72,13 +72,14 @@ void PluginServer_destroyConnection(const void *connHandle) {
delete conn;
}
ssize_t PluginServer_read(const void *connHandle, void *data, size_t nbyte) {
long PluginServer_read(const void *connHandle, void *data,
unsigned long nbyte) {
const auto *conn = static_cast<const ConnectionHandle *>(connHandle);
return ::read(conn->inputFD, data, nbyte);
}
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) {
const auto *conn = static_cast<const ConnectionHandle *>(connHandle);
return ::write(conn->outputFD, data, nbyte);
}