[IDE] Implement generating the Swift interface for an C/ObjC header

This translates clang arguments to swift ones, uses the bridging header
functionality to parse the provided file, and re-uses part of the module interface
printing implementation to print an interface for the header.

Part of rdar://19939192

Swift SVN r28062
This commit is contained in:
Argyrios Kyrtzidis
2015-05-02 01:17:45 +00:00
parent d72ae21e7c
commit a586753f0f
7 changed files with 323 additions and 44 deletions

View File

@@ -17,6 +17,7 @@
#include "swift/Basic/OptionSet.h"
namespace swift {
class ASTContext;
class ASTPrinter;
class Module;
struct PrintOptions;
@@ -46,6 +47,11 @@ void printSubmoduleInterface(Module *M, ArrayRef<StringRef> FullModuleName,
ModuleTraversalOptions TraversalOptions,
ASTPrinter &Printer, const PrintOptions &Options);
/// Print the interface for a header that has been imported via the implicit
/// objc header importing feature.
void printHeaderInterface(StringRef Filename, ASTContext &Ctx,
ASTPrinter &Printer, const PrintOptions &Options);
} // namespace ide
} // namespace swift