@@ -169,35 +169,6 @@ static bool isSwiftDependencyKind(ModuleDependencyKind Kind) {
169
169
Kind == ModuleDependencyKind::SwiftPlaceholder;
170
170
}
171
171
172
- // Wrap the clang file mapping overlay filesystems in a proxy filesystem,
173
- // to avoid enumerating the overlay filesystems in a `visitChildFileSystems`,
174
- // as clang's dependency scanner tries to validate that the number of
175
- // overlay file systems used is the same as the number of `-ivfsoverlay`
176
- // flags passed through the clang invocation. This validation causes an
177
- // assertion failure if the filesystem isn't hidden.
178
- // We don't need to expose the clang importer overlay filesystem to clang's
179
- // dependency scanner, as it only needs to optimize overlay VFS that are
180
- // explicitly passed to it via `-ivfsoverlay`.
181
- class SilentClangImporterOverlayWrapperFS : public llvm ::vfs::ProxyFileSystem {
182
- public:
183
- SilentClangImporterOverlayWrapperFS (
184
- llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs,
185
- llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> baseFS)
186
- : llvm::vfs::ProxyFileSystem(fs), baseFS(baseFS) {}
187
-
188
- void visitChildFileSystems (VisitCallbackTy Callback) override {
189
- // Do not forward to proxy, instead count the base and forward
190
- // to base directly, bypassing the installed clang overlay filesystems.
191
- if (baseFS) {
192
- Callback (*baseFS);
193
- baseFS->visitChildFileSystems (Callback);
194
- }
195
- }
196
-
197
- private:
198
- llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> baseFS;
199
- };
200
-
201
172
static llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>
202
173
getClangInvocationOverlayScanningVFS (
203
174
ASTContext &ctx, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> baseFS) {
0 commit comments