[interop] emit a parsable C++ header for a module that includes namespace declaration for the module interface

This commit is contained in:
Alex Lorenz
2022-01-20 14:01:01 -08:00
parent e106551028
commit 54b466f983
6 changed files with 141 additions and 62 deletions

View File

@@ -1,4 +1,4 @@
//===--- ModuleContentsWriter.h - Walk a module to print ObjC ---*- C++ -*-===//
//===--- ModuleContentsWriter.h - Walk module to print ObjC/C++ -*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
@@ -33,6 +33,12 @@ void printModuleContentsAsObjC(raw_ostream &os,
llvm::SmallPtrSetImpl<ImportModuleTy> &imports,
ModuleDecl &M);
/// Prints the declarations of \p M to \p os in C++ language mode and collects
/// imports in \p imports along the way.
void printModuleContentsAsCxx(raw_ostream &os,
llvm::SmallPtrSetImpl<ImportModuleTy> &imports,
ModuleDecl &M);
} // end namespace swift
#endif