Skip to content

Commit fcc4935

Browse files
authored
Revert "Bump the DWARF version number to 5 on Darwin." (#95325)
Reverts #95164 This broke a buildbot: https://lab.llvm.org/buildbot/#/builders/37/builds/35987
1 parent c9d5800 commit fcc4935

File tree

2 files changed

+2
-37
lines changed

2 files changed

+2
-37
lines changed

clang/lib/Driver/ToolChains/Darwin.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,17 +1257,7 @@ unsigned DarwinClang::GetDefaultDwarfVersion() const {
12571257
if ((isTargetMacOSBased() && isMacosxVersionLT(10, 11)) ||
12581258
(isTargetIOSBased() && isIPhoneOSVersionLT(9)))
12591259
return 2;
1260-
// Default to use DWARF 4 on OS X 10.11 - macOS 14 / iOS 9 - iOS 17.
1261-
if ((isTargetMacOSBased() && isMacosxVersionLT(15)) ||
1262-
(isTargetIOSBased() && isIPhoneOSVersionLT(18)) ||
1263-
(isTargetWatchOSBased() && TargetVersion < llvm::VersionTuple(11)) ||
1264-
(isTargetXROS() && TargetVersion < llvm::VersionTuple(2)) ||
1265-
(isTargetDriverKit() && TargetVersion < llvm::VersionTuple(24)) ||
1266-
(isTargetMacOSBased() &&
1267-
TargetVersion.empty()) || // apple-darwin, no version.
1268-
(TargetPlatform == llvm::Triple::BridgeOS))
1269-
return 4;
1270-
return 5;
1260+
return 4;
12711261
}
12721262

12731263
void MachO::AddLinkRuntimeLib(const ArgList &Args, ArgStringList &CmdArgs,

clang/test/Driver/debug-options.c

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -68,32 +68,7 @@
6868
// RUN: %clang -### -c -g %s -target x86_64-apple-driverkit19.0 2>&1 \
6969
// RUN: | FileCheck -check-prefix=G_STANDALONE \
7070
// RUN: -check-prefix=G_DWARF4 %s
71-
// RUN: %clang -### -c -g %s -target x86_64-apple-macosx15 2>&1 \
72-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
73-
// RUN: -check-prefix=G_DWARF5 %s
74-
// RUN: %clang -### -c -g %s -target arm64-apple-ios17.0 2>&1 \
75-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
76-
// RUN: -check-prefix=G_DWARF4 %s
77-
// RUN: %clang -### -c -g %s -target arm64-apple-ios18.0 2>&1 \
78-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
79-
// RUN: -check-prefix=G_DWARF5 %s
80-
// RUN: %clang -### -c -g %s -target arm64_32-apple-watchos11 2>&1 \
81-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
82-
// RUN: -check-prefix=G_DWARF5 %s
83-
// RUN: %clang -### -c -g %s -target arm64-apple-tvos18.0 2>&1 \
84-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
85-
// RUN: -check-prefix=G_DWARF5 %s
86-
// RUN: %clang -### -c -g %s -target x86_64-apple-driverkit24.0 2>&1 \
87-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
88-
// RUN: -check-prefix=G_DWARF5 %s
89-
// RUN: %clang -### -c -g %s -target arm64-apple-xros1 2>&1 \
90-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
91-
// RUN: -check-prefix=G_DWARF4 %s
92-
// RUN: %clang -### -c -g %s -target arm64-apple-xros2 2>&1 \
93-
// RUN: | FileCheck -check-prefix=G_STANDALONE \
94-
// RUN: -check-prefix=G_DWARF5 %s
95-
//
96-
// RUN: %clang -### -c -fsave-optimization-record %s \
71+
// RUN: %clang -### -c -fsave-optimization-record %s \
9772
// RUN: -target x86_64-apple-darwin 2>&1 \
9873
// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
9974
// RUN: %clang -### -c -g -fsave-optimization-record %s \

0 commit comments

Comments
 (0)