Skip to content

Commit d0f16bf

Browse files
Merge pull request #4697 from adrian-prantl/28231982
Bump the DWARF format to version 4 on Darwin.
2 parents d88e003 + 9f060dc commit d0f16bf

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

include/swift/Basic/Dwarf.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
namespace swift {
2323
/// The DWARF version emitted by the Swift compiler.
24-
const unsigned GenericDWARFVersion = 3;
25-
const unsigned CygwinDWARFVersion = 4;
24+
const unsigned DWARFVersion = 4;
2625

2726
static const char MachOASTSegmentName[] = "__SWIFT";
2827
static const char MachOASTSectionName[] = "__ast";

lib/FrontendTool/FrontendTool.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -1182,9 +1182,7 @@ int swift::performFrontend(ArrayRef<const char *> Args,
11821182

11831183
// Setting DWARF Version depend on platform
11841184
IRGenOptions &IRGenOpts = Invocation.getIRGenOptions();
1185-
IRGenOpts.DWARFVersion = swift::GenericDWARFVersion;
1186-
if (Invocation.getLangOptions().Target.isWindowsCygwinEnvironment())
1187-
IRGenOpts.DWARFVersion = swift::CygwinDWARFVersion;
1185+
IRGenOpts.DWARFVersion = swift::DWARFVersion;
11881186

11891187
// The compiler invocation is now fully configured; notify our observer.
11901188
if (observer) {

test/DebugInfo/apple-types-accel.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
22
// RUN: %target-swift-frontend %s -c -g -o %t.o
3-
// RUN: dwarfdump --verify --apple-types %t.o | %FileCheck --check-prefix=CHECK-ACCEL %s
3+
// RUN: dwarfdump --apple-types %t.o | %FileCheck --check-prefix=CHECK-ACCEL %s
44
// RUN: dwarfdump --debug-info %t.o | %FileCheck --check-prefix=CHECK-DWARF %s
5-
5+
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
66
// REQUIRES: OS=macosx
77

88
// Verify that the unmangles basenames end up in the accelerator table.

test/DebugInfo/basic.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func foo(_ a: Int64, _ b: Int64) -> Int64 {
8181
// CHECK-DAG: ![[MAINMODULE]] = !DIModule({{.*}}, name: "basic"
8282

8383
// DWARF Version
84-
// CHECK-DAG: i32 2, !"Dwarf Version", i32 3}
84+
// CHECK-DAG: i32 2, !"Dwarf Version", i32 4}
8585

8686
// Debug Info Version
8787
// CHECK-DAG: i32 2, !"Debug Info Version", i32

test/DebugInfo/test-foundation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %FileCheck %s --check-prefix LOC-CHECK < %t.ll
44
// RUN: llc %t.ll -filetype=obj -o %t.o
55
// RUN: llvm-dwarfdump %t.o | %FileCheck %s --check-prefix DWARF-CHECK
6-
// RUN: dwarfdump --verify %t.o
6+
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
77

88
// REQUIRES: OS=macosx
99

0 commit comments

Comments
 (0)