File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1313#
1414# CHECK-NOT: Skipping compiled textual Swift interface: {{.*}}/Inputs/Binary.swiftmodule
1515# CHECK: Skipping compiled textual Swift interface: {{.*}}/Inputs/FromInterface.swiftmodule
16+ # CHECK-NOT: Skipping compiled textual Swift interface: {{.*}}/Inputs/FromInterface.swiftmodule
1617
1718#
1819---
@@ -26,4 +27,8 @@ objects:
2627 timestamp: 0
2728 type: 50
2829 symbols: []
30+ - filename: '../Inputs/FromInterface.swiftmodule'
31+ timestamp: 0
32+ type: 50
33+ symbols: []
2934...
Original file line number Diff line number Diff line change 1919#include " llvm/ADT/STLExtras.h"
2020#include " llvm/ADT/SmallString.h"
2121#include " llvm/ADT/StringRef.h"
22+ #include " llvm/ADT/StringSet.h"
2223#include " llvm/ADT/Twine.h"
2324#include " llvm/BinaryFormat/Dwarf.h"
2425#include " llvm/BinaryFormat/MachO.h"
@@ -771,6 +772,7 @@ bool DwarfLinkerForBinary::linkImpl(
771772 MaxDWARFVersion = std::max (Unit.getVersion (), MaxDWARFVersion);
772773 };
773774
775+ llvm::StringSet<> SwiftModules;
774776 for (const auto &Obj : Map.objects ()) {
775777 // N_AST objects (swiftmodule files) should get dumped directly into the
776778 // appropriate DWARF section.
@@ -779,6 +781,9 @@ bool DwarfLinkerForBinary::linkImpl(
779781 outs () << " DEBUG MAP OBJECT: " << Obj->getObjectFilename () << " \n " ;
780782
781783 StringRef File = Obj->getObjectFilename ();
784+ if (!SwiftModules.insert (File).second )
785+ continue ;
786+
782787 auto ErrorOrMem = MemoryBuffer::getFile (File);
783788 if (!ErrorOrMem) {
784789 reportWarning (" Could not open '" + File + " '" );
You can’t perform that action at this time.
0 commit comments