[llvm] ab093bf - Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 17:30:24 PDT 2020
Author: David Blaikie
Date: 2020-04-20T17:29:04-07:00
New Revision: ab093bfed7602b74913cc448ad70e27f65aefc28
URL: https://github.com/llvm/llvm-project/commit/ab093bfed7602b74913cc448ad70e27f65aefc28
DIFF: https://github.com/llvm/llvm-project/commit/ab093bfed7602b74913cc448ad70e27f65aefc28.diff
LOG: Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization
Recommits c51b45e32ef7f35c11891f60871aa9c2c04cd991
Reverted in b350c666ab65b7585bc58301b03d2b46dc6b0504 due to some
(Google-internal) regressions I cannot reproduce... (so we'll see if
they reproduce this time around)
Added:
Modified:
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/test/Assembler/dicompileunit.ll
llvm/test/DebugInfo/X86/range_reloc.ll
Removed:
################################################################################
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 73809197f08f..dc7301d9f531 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -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;
}
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 6ec4416f4b43..735d802e8229 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -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]));
diff --git a/llvm/test/Assembler/dicompileunit.ll b/llvm/test/Assembler/dicompileunit.ll
index cca284fc41c4..4dbf4b6ef15f 100644
--- a/llvm/test/Assembler/dicompileunit.ll
+++ b/llvm/test/Assembler/dicompileunit.ll
@@ -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: "",
diff --git a/llvm/test/DebugInfo/X86/range_reloc.ll b/llvm/test/DebugInfo/X86/range_reloc.ll
index 37ed4a76fd8c..147d20e5b9f7 100644
--- a/llvm/test/DebugInfo/X86/range_reloc.ll
+++ b/llvm/test/DebugInfo/X86/range_reloc.ll
@@ -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)
More information about the llvm-commits
mailing list