mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[interop] emit a parsable C++ header for a module that includes namespace declaration for the module interface
This commit is contained in:
@@ -619,3 +619,15 @@ swift::printModuleContentsAsObjC(raw_ostream &os,
|
||||
: AccessLevel::Internal;
|
||||
ModuleWriter(os, imports, M, requiredAccess).write();
|
||||
}
|
||||
|
||||
void swift::printModuleContentsAsCxx(
|
||||
raw_ostream &os, llvm::SmallPtrSetImpl<ImportModuleTy> &imports,
|
||||
ModuleDecl &M) {
|
||||
os << "namespace ";
|
||||
M.ValueDecl::getName().print(os);
|
||||
os << " {\n\n";
|
||||
// TODO (Alex): Emit module contents.
|
||||
os << "\n} // namespace ";
|
||||
M.ValueDecl::getName().print(os);
|
||||
os << "\n\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user