Skip to content

Commit ad5c750

Browse files
committed
IRGen: further generalise runtime function generation
This adjusts the runtime function declaration handling to track the owning module for the well known functions. This allows us to ensure that we are able to properly identify if the symbol should be imported or not when building the shared libraries. This will require a subsequent tweak to allow for checking for static library linkage to ensure that we do not mark the symbol as DLLImport when doing static linking.
1 parent 12675dd commit ad5c750

File tree

5 files changed

+317
-312
lines changed

5 files changed

+317
-312
lines changed

include/swift/Runtime/RuntimeFnWrappersGen.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ enum class RuntimeAvailability {
3939
/// given name, return types, argument types, attributes and
4040
/// a calling convention.
4141
llvm::Constant *getRuntimeFn(llvm::Module &Module, llvm::Constant *&cache,
42-
char const *name, llvm::CallingConv::ID cc,
42+
const char *ModuleName, char const *FunctionName,
43+
llvm::CallingConv::ID cc,
4344
RuntimeAvailability availability,
4445
llvm::ArrayRef<llvm::Type *> retTypes,
4546
llvm::ArrayRef<llvm::Type *> argTypes,

0 commit comments

Comments
 (0)