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 13
13
#
14
14
# CHECK-NOT: Skipping compiled textual Swift interface: {{.*}}/Inputs/Binary.swiftmodule
15
15
# CHECK: Skipping compiled textual Swift interface: {{.*}}/Inputs/FromInterface.swiftmodule
16
+ # CHECK-NOT: Skipping compiled textual Swift interface: {{.*}}/Inputs/FromInterface.swiftmodule
16
17
17
18
#
18
19
---
@@ -26,4 +27,8 @@ objects:
26
27
timestamp: 0
27
28
type: 50
28
29
symbols: []
30
+ - filename: '../Inputs/FromInterface.swiftmodule'
31
+ timestamp: 0
32
+ type: 50
33
+ symbols: []
29
34
...
Original file line number Diff line number Diff line change 19
19
#include " llvm/ADT/STLExtras.h"
20
20
#include " llvm/ADT/SmallString.h"
21
21
#include " llvm/ADT/StringRef.h"
22
+ #include " llvm/ADT/StringSet.h"
22
23
#include " llvm/ADT/Twine.h"
23
24
#include " llvm/BinaryFormat/Dwarf.h"
24
25
#include " llvm/BinaryFormat/MachO.h"
@@ -769,6 +770,7 @@ bool DwarfLinkerForBinary::linkImpl(
769
770
MaxDWARFVersion = std::max (Unit.getVersion (), MaxDWARFVersion);
770
771
};
771
772
773
+ llvm::StringSet<> SwiftModules;
772
774
for (const auto &Obj : Map.objects ()) {
773
775
// N_AST objects (swiftmodule files) should get dumped directly into the
774
776
// appropriate DWARF section.
@@ -777,6 +779,9 @@ bool DwarfLinkerForBinary::linkImpl(
777
779
outs () << " DEBUG MAP OBJECT: " << Obj->getObjectFilename () << " \n " ;
778
780
779
781
StringRef File = Obj->getObjectFilename ();
782
+ if (!SwiftModules.insert (File).second )
783
+ continue ;
784
+
780
785
auto ErrorOrMem = MemoryBuffer::getFile (File);
781
786
if (!ErrorOrMem) {
782
787
reportWarning (" Could not open '" + File + " '" );
You can’t perform that action at this time.
0 commit comments