File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -2695,17 +2695,18 @@ void Serializer::writeDecl(const Decl *D) {
2695
2695
auto getFilename = [](FileUnit *enclosingFile,
2696
2696
const ValueDecl *decl) -> StringRef {
2697
2697
if (auto *SF = dyn_cast<SourceFile>(enclosingFile)) {
2698
- return SF->getFilename ();
2698
+ return llvm::sys::path::filename ( SF->getFilename () );
2699
2699
} else if (auto *LF = dyn_cast<LoadedFile>(enclosingFile)) {
2700
- return LF->getFilenameForPrivateDecl (decl);
2700
+ return llvm::sys::path::filename (
2701
+ (LF->getFilenameForPrivateDecl (decl)));
2701
2702
}
2702
2703
return StringRef ();
2703
2704
};
2704
2705
// Only if compiled with -enable-private-imports.
2705
2706
if (M->arePrivateImportsEnabled ()) {
2706
2707
auto filename = getFilename (enclosingFile, value);
2707
2708
if (!filename.empty ()) {
2708
- auto filenameID = addFilename (llvm::sys::path:: filename(filename) );
2709
+ auto filenameID = addFilename (filename);
2709
2710
FilenameForPrivateLayout::emitRecord (
2710
2711
Out, ScratchRecord,
2711
2712
DeclTypeAbbrCodes[FilenameForPrivateLayout::Code], filenameID);
Original file line number Diff line number Diff line change 1
1
private struct Base {
2
- private func shouldNotBeVisible ( ) { }
2
+ private func bar ( ) { }
3
3
}
Original file line number Diff line number Diff line change 1
1
private struct Base {
2
2
private func member( ) { }
3
+ private func bar( ) { }
3
4
}
4
5
5
6
private struct Other {
Original file line number Diff line number Diff line change 32
32
private func foo( ) { }
33
33
}
34
34
35
- extension Base {
36
- // This should not cause a failure.
37
- private func shouldNotBeVisible( ) { }
38
- }
39
-
40
35
public func unreleated( ) { }
41
36
42
37
// This should not conflict with Other from private_import_other_2.swift.
47
42
@_private ( sourceFile: " private_import.swift " ) import client
48
43
49
44
Base ( ) . foo ( )
45
+ // This should not be ambigious.
46
+ Base ( ) . bar ( )
50
47
51
48
unreleated ( )
52
49
#endif
You can’t perform that action at this time.
0 commit comments