mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop] Remove symbolic import mode
Importing C++ class templates in symbolic mode has proven to be problematic in interaction with other compiler features, and it isn't used widely. This change removes the feature. rdar://150528798
This commit is contained in:
@@ -836,27 +836,3 @@ void swift::ide::printHeaderInterface(
|
||||
}
|
||||
Printer.forceNewlines();
|
||||
}
|
||||
|
||||
void swift::ide::printSymbolicSwiftClangModuleInterface(
|
||||
ModuleDecl *M, ASTPrinter &Printer, const clang::Module *clangModule) {
|
||||
std::string headerComment;
|
||||
llvm::raw_string_ostream(headerComment)
|
||||
<< "// Swift interface for " << (clangModule->IsSystem ? "system " : "")
|
||||
<< "module '" << clangModule->Name << "'\n";
|
||||
Printer.printText(headerComment);
|
||||
|
||||
ModuleTraversalOptions opts;
|
||||
opts |= ModuleTraversal::VisitSubmodules;
|
||||
auto popts =
|
||||
PrintOptions::printModuleInterface(/*printFullConvention=*/false);
|
||||
popts.PrintDocumentationComments = false;
|
||||
popts.SkipInlineCXXNamespace = true;
|
||||
|
||||
auto &SwiftContext = M->getTopLevelModule()->getASTContext();
|
||||
auto &Importer =
|
||||
static_cast<ClangImporter &>(*SwiftContext.getClangModuleLoader());
|
||||
Importer.withSymbolicFeatureEnabled([&]() {
|
||||
printModuleInterface(M, {}, opts, Printer, popts,
|
||||
/*SynthesizeExtensions=*/false);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user