21
21
22
22
#include " swift/AST/ClangNode.h"
23
23
#include " swift/AST/TypeAlignments.h"
24
- #include " swift/SIL/SILLinkage.h"
25
24
#include " llvm/ADT/Hashing.h"
26
25
#include " llvm/ADT/DenseMap.h"
27
26
#include " llvm/ADT/PointerUnion.h"
@@ -47,6 +46,7 @@ namespace swift {
47
46
enum class SubclassScope : unsigned char ;
48
47
class SILModule ;
49
48
class SILLocation ;
49
+ enum class SILLinkage : uint8_t ;
50
50
class AnyFunctionRef ;
51
51
52
52
// / How a method is dispatched.
@@ -423,22 +423,6 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, SILDeclRef C) {
423
423
return OS;
424
424
}
425
425
426
- // FIXME: This should not be necessary, but it looks like visibility rules for
427
- // extension members are slightly bogus, and so some protocol witness thunks
428
- // need to be public.
429
- //
430
- // We allow a 'public' member of an extension to witness a public
431
- // protocol requirement, even if the extended type is not public;
432
- // then SILGen gives the member private linkage, ignoring the more
433
- // visible access level it was given in the AST.
434
- inline bool
435
- fixmeWitnessHasLinkageThatNeedsToBePublic (SILDeclRef witness) {
436
- auto witnessLinkage = witness.getLinkage (ForDefinition);
437
- return !hasPublicVisibility (witnessLinkage)
438
- && (!hasSharedVisibility (witnessLinkage)
439
- || !witness.isSerialized ());
440
- }
441
-
442
426
} // end swift namespace
443
427
444
428
namespace llvm {
0 commit comments