mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ClangImporter::create had a 'weak' attribute but it did not actually have the desired effect, static libraries still want to link to ClangImporter::create if it is used. Avoiding linking ClangImporter kinda "worked" because CompilerInvocation::setSDKPath was inline, so if you didn't call it then you didn't need to link to Clang importer, but that is avoiding ClangImporter statically, not dynamically. You could see this by moving CompilerInvocation::setSDKPath out-of-line and then sil-opt would fail to link. In order to have clients avoiding linking Clang, introduce NullClangImporter which just returns null for the ClangImporter constructor function. Swift SVN r7465
7.3 KiB
7.3 KiB