mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[embedded] Start fencing parts of IRGen that are not compatible with embedded Swift.
This commit is contained in:
@@ -2568,6 +2568,10 @@ static void eraseExistingTypeContextDescriptor(IRGenModule &IGM,
|
||||
void irgen::emitLazyTypeContextDescriptor(IRGenModule &IGM,
|
||||
NominalTypeDecl *type,
|
||||
RequireMetadata_t requireMetadata) {
|
||||
if (type->getASTContext().LangOpts.hasFeature(Feature::Embedded)) {
|
||||
return;
|
||||
}
|
||||
|
||||
eraseExistingTypeContextDescriptor(IGM, type);
|
||||
|
||||
bool hasLayoutString = false;
|
||||
@@ -6466,6 +6470,10 @@ SpecialProtocol irgen::getSpecialProtocolID(ProtocolDecl *P) {
|
||||
void IRGenModule::emitProtocolDecl(ProtocolDecl *protocol) {
|
||||
PrettyStackTraceDecl stackTraceRAII("emitting metadata for", protocol);
|
||||
|
||||
if (protocol->getASTContext().LangOpts.hasFeature(Feature::Embedded)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Marker protocols are never emitted.
|
||||
if (protocol->isMarkerProtocol())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user