Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/swift/Basic/Dwarf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

namespace swift {
/// The DWARF version emitted by the Swift compiler.
const unsigned GenericDWARFVersion = 3;
const unsigned CygwinDWARFVersion = 4;
const unsigned DWARFVersion = 4;

static const char MachOASTSegmentName[] = "__SWIFT";
static const char MachOASTSectionName[] = "__ast";
Expand Down
4 changes: 1 addition & 3 deletions lib/FrontendTool/FrontendTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,9 +1181,7 @@ int swift::performFrontend(ArrayRef<const char *> Args,

// Setting DWARF Version depend on platform
IRGenOptions &IRGenOpts = Invocation.getIRGenOptions();
IRGenOpts.DWARFVersion = swift::GenericDWARFVersion;
if (Invocation.getLangOptions().Target.isWindowsCygwinEnvironment())
IRGenOpts.DWARFVersion = swift::CygwinDWARFVersion;
IRGenOpts.DWARFVersion = swift::DWARFVersion;

// The compiler invocation is now fully configured; notify our observer.
if (observer) {
Expand Down
4 changes: 2 additions & 2 deletions test/DebugInfo/apple-types-accel.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -c -g -o %t.o
// RUN: dwarfdump --verify --apple-types %t.o | %FileCheck --check-prefix=CHECK-ACCEL %s
// RUN: dwarfdump --apple-types %t.o | %FileCheck --check-prefix=CHECK-ACCEL %s
// RUN: dwarfdump --debug-info %t.o | %FileCheck --check-prefix=CHECK-DWARF %s

// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
// REQUIRES: OS=macosx

// Verify that the unmangles basenames end up in the accelerator table.
Expand Down
2 changes: 1 addition & 1 deletion test/DebugInfo/basic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func foo(_ a: Int64, _ b: Int64) -> Int64 {
// CHECK-DAG: ![[MAINMODULE]] = !DIModule({{.*}}, name: "basic"

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

// Debug Info Version
// CHECK-DAG: i32 2, !"Debug Info Version", i32
2 changes: 1 addition & 1 deletion test/DebugInfo/test-foundation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: %FileCheck %s --check-prefix LOC-CHECK < %t.ll
// RUN: llc %t.ll -filetype=obj -o %t.o
// RUN: llvm-dwarfdump %t.o | %FileCheck %s --check-prefix DWARF-CHECK
// RUN: dwarfdump --verify %t.o
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o

// REQUIRES: OS=macosx

Expand Down