Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization

Recommits c51b45e32e
Reverted in b350c666ab due to some
(Google-internal) regressions I cannot reproduce... (so we'll see if
they reproduce this time around)
This commit is contained in:
David Blaikie 2020-04-20 17:23:47 -07:00
parent b87531ca68
commit ab093bfed7
4 changed files with 6 additions and 7 deletions

View File

@ -4675,7 +4675,7 @@ bool LLParser::ParseDICompileUnit(MDNode *&Result, bool IsDistinct) {
OPTIONAL(splitDebugInlining, MDBoolField, = true); \
OPTIONAL(debugInfoForProfiling, MDBoolField, = false); \
OPTIONAL(nameTableKind, NameTableKindField, ); \
OPTIONAL(debugBaseAddress, MDBoolField, = false); \
OPTIONAL(rangesBaseAddress, MDBoolField, = false); \
OPTIONAL(sysroot, MDStringField, ); \
OPTIONAL(sdk, MDStringField, );
PARSE_MD_FIELDS();
@ -4686,7 +4686,7 @@ bool LLParser::ParseDICompileUnit(MDNode *&Result, bool IsDistinct) {
runtimeVersion.Val, splitDebugFilename.Val, emissionKind.Val, enums.Val,
retainedTypes.Val, globals.Val, imports.Val, macros.Val, dwoId.Val,
splitDebugInlining.Val, debugInfoForProfiling.Val, nameTableKind.Val,
debugBaseAddress.Val, sysroot.Val, sdk.Val);
rangesBaseAddress.Val, sysroot.Val, sdk.Val);
return false;
}

View File

@ -1483,8 +1483,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
Record.size() <= 16 ? true : Record[16],
Record.size() <= 17 ? false : Record[17],
Record.size() <= 18 ? 0 : Record[18],
false, // FIXME: https://reviews.llvm.org/rGc51b45e32ef7f35c11891f60871aa9c2c04cd991
// Record.size() <= 19 ? 0 : Record[19],
Record.size() <= 19 ? 0 : Record[19],
Record.size() <= 20 ? nullptr : getMDString(Record[20]),
Record.size() <= 21 ? nullptr : getMDString(Record[21]));

View File

@ -16,14 +16,14 @@
!6 = distinct !{}
!7 = distinct !{}
; CHECK: !8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, flags: "-O2", runtimeVersion: 2, splitDebugFilename: "abc.debug", emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !5, imports: !6, macros: !7, dwoId: 42, sysroot: "/")
; CHECK: !8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, flags: "-O2", runtimeVersion: 2, splitDebugFilename: "abc.debug", emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !5, imports: !6, macros: !7, dwoId: 42, rangesBaseAddress: true, sysroot: "/")
!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang",
isOptimized: true, flags: "-O2", runtimeVersion: 2,
splitDebugFilename: "abc.debug",
emissionKind: FullDebug,
enums: !2, retainedTypes: !3,
globals: !5, imports: !6, macros: !7, dwoId: 42,
splitDebugInlining: true, sysroot: "/")
splitDebugInlining: true, rangesBaseAddress: true, sysroot: "/")
; CHECK: !9 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
!9 = distinct !DICompileUnit(language: 12, file: !1, producer: "",

View File

@ -140,7 +140,7 @@ entry:
!llvm.ident = !{!5, !5}
!llvm.module.flags = !{!6, !7, !8}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk 346343) (llvm/trunk 346350)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None, debugBaseAddress: true)
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk 346343) (llvm/trunk 346350)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None, rangesBaseAddress: true)
!1 = !DIFile(filename: "ranges.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")
!2 = !{}
!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "clang version 8.0.0 (trunk 346343) (llvm/trunk 346350)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)