File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -3129,7 +3129,6 @@ Error DWARFLinker::link() {
31293129 // Emit everything that's global.
31303130 if (TheDwarfEmitter != nullptr ) {
31313131 TheDwarfEmitter->emitAbbrevs (Abbreviations, Options.TargetDWARFVersion );
3132- TheDwarfEmitter->emitStrings (DebugStrPool);
31333132 TheDwarfEmitter->emitStringOffsets (StringOffsetPool.getValues (),
31343133 Options.TargetDWARFVersion );
31353134 TheDwarfEmitter->emitLineStrings (DebugLineStrPool);
@@ -3150,6 +3149,7 @@ Error DWARFLinker::link() {
31503149 break ;
31513150 }
31523151 }
3152+ TheDwarfEmitter->emitStrings (DebugStrPool);
31533153 }
31543154 };
31553155
Original file line number Diff line number Diff line change 1+ # Check that the __debug_str section is last in the output
2+
3+ # RUN: rm -rf %t && mkdir %t
4+ # RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose -no-swiftmodule-timestamp
5+ # RUN: llvm-dwarfdump --show-section-sizes %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s
6+
7+ # This test verifies that the __debug_str section appears last in the section list.
8+
9+ # CHECK: SECTION
10+ # CHECK: __swift_ast
11+ # CHECK: __debug_abbrev
12+ # CHECK: __apple_namespac
13+ # CHECK: __apple_names
14+ # CHECK: __apple_types
15+ # CHECK: __apple_objc
16+ # CHECK-NOT: __apple
17+ # CHECK: __debug_str
You can’t perform that action at this time.
0 commit comments