mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[interop][SwiftToCxx] add support for emitting Swift stdlib dependency in one header file
This is the default behavior. You can disable this by specifying the -clang-header-expose-decls= flag explicitly when generating the header
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "swift/Frontend/FrontendInputsAndOutputs.h"
|
||||
#include "swift/Frontend/InputFile.h"
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
|
||||
#include <string>
|
||||
@@ -388,9 +389,16 @@ public:
|
||||
/// '.../lib/swift', otherwise '.../lib/swift_static'.
|
||||
bool UseSharedResourceFolder = true;
|
||||
|
||||
/// Indicates whether to expose all public declarations in the generated clang
|
||||
enum class ClangHeaderExposeBehavior {
|
||||
/// Expose all public declarations in the generated header.
|
||||
AllPublic,
|
||||
/// Expose declarations only when they have expose attribute.
|
||||
HasExposeAttr
|
||||
};
|
||||
|
||||
/// Indicates which declarations should be exposed in the generated clang
|
||||
/// header.
|
||||
bool ExposePublicDeclsInClangHeader = false;
|
||||
llvm::Optional<ClangHeaderExposeBehavior> ClangHeaderExposedDecls;
|
||||
|
||||
/// Emit C++ bindings for the exposed Swift declarations in the generated
|
||||
/// clang header.
|
||||
|
||||
Reference in New Issue
Block a user