Skip to content

Commit 674490a

Browse files
authored
Merge pull request #30944 from DougGregor/import-module-for-empty-extensions
Revert "[PrintAsObjC] Don't include the module for empty extensions"
2 parents 48b6bcd + 091f987 commit 674490a

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

lib/PrintAsObjC/ModuleContentsWriter.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,6 @@ class ModuleWriter {
400400
}
401401

402402
bool writeExtension(const ExtensionDecl *ED) {
403-
if (printer.isEmptyExtensionDecl(ED))
404-
return true;
405-
406403
bool allRequirementsSatisfied = true;
407404

408405
const ClassDecl *CD = ED->getSelfClassDecl();

test/PrintAsObjC/Inputs/custom-modules/MiserablePileOfSecrets.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33
@interface NSObject (Secrets)
44
- (void)secretMethod;
55
@end
6-
7-
@interface SecretClass : NSObject
8-
@end

test/PrintAsObjC/imports.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,3 @@ import MostlyPrivate2_Private
6767
@objc public class TestSubclass: NSObject {
6868
@_implementationOnly public override func secretMethod() {}
6969
}
70-
71-
extension SecretClass {
72-
private func somethingThatShouldNotBeIncluded() {}
73-
}

0 commit comments

Comments
 (0)