mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Initial, untested support for uniquing generic class metadata,
which is necessary to embed the value witnesses there. Swift SVN r2671
This commit is contained in:
@@ -195,6 +195,19 @@ llvm::Constant *IRGenModule::getDeallocObjectFn() {
|
||||
return DeallocObjectFn;
|
||||
}
|
||||
|
||||
llvm::Constant *IRGenModule::getGetGenericMetadataFn() {
|
||||
if (GetGenericMetadataFn) return GetGenericMetadataFn;
|
||||
|
||||
// heap_metadata_t *swift_getGenericMetadata(heap_metadata_t *pattern,
|
||||
// const void *arguments);
|
||||
llvm::Type *argTypes[] = { HeapMetadataPtrTy, Int8PtrTy };
|
||||
llvm::FunctionType *fnType =
|
||||
llvm::FunctionType::get(HeapMetadataPtrTy, argTypes, false);
|
||||
GetGenericMetadataFn =
|
||||
createRuntimeFunction(*this, "swift_getGenericMetadata", fnType);
|
||||
return GetGenericMetadataFn;
|
||||
}
|
||||
|
||||
void IRGenModule::unimplemented(SourceLoc loc, StringRef message) {
|
||||
Context.Diags.diagnose(loc, diag::irgen_unimplemented, message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user