3 ms·
Swift's compiler uses a lot more functionality from LLVM than Rust's compiler. For example, Clang's C++ API is used to parse and type-check C / Objective-C head
by cwzwarich 11y ago
Swift's compiler uses a lot more functionality from LLVM than Rust's compiler. For example, Clang's C++ API is used to parse and type-check C / Objective-C headers. Potential interoperability with C++ in the future would make this API surface even larger.
- masklinn 11y agoC++ interop would make the whole issue moot since you wouldn't need most of the shim anymore: you'd only have to shim enough to interop with C++, then from that could call the LLVM API directly.
- cwzwarich 11y agoThat's a good point, although full C++ interoperability may be many years out, and it would probably have to include things like templates for that plan to work.