Skip to content

Commit 1d61e31

Browse files
committed
Debug Info: Use the major runtime version only to populate the
DW_AT_APPLE_major_runtime_vers attribute. LLDB currently doesn't use this field, so this discontinuity is still safe. Because of the dependency on the version number this is hard to write a testcase for. rdar://problem/24176158
1 parent c735c00 commit 1d61e31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ IRGenDebugInfo::IRGenDebugInfo(const IRGenOptions &Opts,
128128
StringRef Flags = Opts.DWARFDebugFlags;
129129
unsigned Major, Minor;
130130
std::tie(Major, Minor) = version::getSwiftNumericVersion();
131-
unsigned RuntimeVersion = Major*100 + Minor;
131+
unsigned MajorRuntimeVersion = Major;
132132

133133
// No split DWARF on Darwin.
134134
StringRef SplitName = StringRef();
135135
// Note that File + Dir need not result in a valid path.
136136
// Clang is doing the same thing here.
137137
TheCU = DBuilder.createCompileUnit(
138138
Lang, AbsMainFile, Opts.DebugCompilationDir, Producer, IsOptimized,
139-
Flags, RuntimeVersion, SplitName,
139+
Flags, MajorRuntimeVersion, SplitName,
140140
Opts.DebugInfoKind == IRGenDebugInfoKind::LineTables
141141
? llvm::DIBuilder::LineTablesOnly
142142
: llvm::DIBuilder::FullDebug);

0 commit comments

Comments
 (0)