Skip to content

Commit d22a405

Browse files
authored
Merge pull request swiftlang#24822 from jckarter/opaque-type-runtime-weak-link
IRGen: Weak-link opaque type entry points.
2 parents 30be693 + 2ade303 commit d22a405

File tree

8 files changed

+336
-219
lines changed

8 files changed

+336
-219
lines changed

include/swift/AST/ASTContext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace clang {
5050
namespace swift {
5151
class ASTContext;
5252
enum class Associativity : unsigned char;
53+
class AvailabilityContext;
5354
class BoundGenericType;
5455
class ClangNode;
5556
class ConstructorDecl;
@@ -584,6 +585,9 @@ class ASTContext final {
584585
void addDestructorCleanup(T &object) {
585586
addCleanup([&object]{ object.~T(); });
586587
}
588+
589+
/// Get the runtime availability of the opaque types language feature for the target platform.
590+
AvailabilityContext getOpaqueTypeAvailability();
587591

588592
//===--------------------------------------------------------------------===//
589593
// Diagnostics Helper functions

include/swift/Runtime/RuntimeFnWrappersGen.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "llvm/ADT/ArrayRef.h"
2121

2222
namespace swift {
23+
24+
class AvailabilityContext;
2325

2426
/// Generate an llvm declaration for a runtime entry with a
2527
/// given name, return types, argument types, attributes and
@@ -28,6 +30,7 @@ llvm::Constant *getRuntimeFn(llvm::Module &Module,
2830
llvm::Constant *&cache,
2931
char const *name,
3032
llvm::CallingConv::ID cc,
33+
bool isWeakLinked,
3134
llvm::ArrayRef<llvm::Type*> retTypes,
3235
llvm::ArrayRef<llvm::Type*> argTypes,
3336
llvm::ArrayRef<llvm::Attribute::AttrKind> attrs);

0 commit comments

Comments
 (0)