[llvm] b350c66 - Revert "DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization"
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 30 22:55:42 PST 2019
Author: David Blaikie
Date: 2019-12-30T22:33:35-08:00
New Revision: b350c666ab65b7585bc58301b03d2b46dc6b0504
URL: https://github.com/llvm/llvm-project/commit/b350c666ab65b7585bc58301b03d2b46dc6b0504
DIFF: https://github.com/llvm/llvm-project/commit/b350c666ab65b7585bc58301b03d2b46dc6b0504.diff
LOG: Revert "DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization"
Seeing some curious CFI failures internally - which makes little sense
to me, as I don't think anyone is using this flag (even us,
internally)... so sounds like a bug in my code somewhere (possibly a
latent one that propagating this flag exposed, not sure). Reverting
while I investigate.
This reverts commit c51b45e32ef7f35c11891f60871aa9c2c04cd991.
Added:
Modified:
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.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 5d3f5bcd6968..1a17f633ae16 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -4656,7 +4656,7 @@ bool LLParser::ParseDICompileUnit(MDNode *&Result, bool IsDistinct) {
OPTIONAL(splitDebugInlining, MDBoolField, = true); \
OPTIONAL(debugInfoForProfiling, MDBoolField, = false); \
OPTIONAL(nameTableKind, NameTableKindField, ); \
- OPTIONAL(rangesBaseAddress, MDBoolField, = false);
+ OPTIONAL(debugBaseAddress, MDBoolField, = false);
PARSE_MD_FIELDS();
#undef VISIT_MD_FIELDS
@@ -4665,7 +4665,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,
- rangesBaseAddress.Val);
+ debugBaseAddress.Val);
return false;
}
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 4fccf96d6f92..4da51dda8b74 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -1457,7 +1457,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
break;
}
case bitc::METADATA_COMPILE_UNIT: {
- if (Record.size() < 14 || Record.size() > 20)
+ if (Record.size() < 14 || Record.size() > 19)
return error("Invalid record");
// Ignore Record[0], which indicates whether this compile unit is
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index a564c30b8422..dcff7c421fc4 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1661,7 +1661,6 @@ void ModuleBitcodeWriter::writeDICompileUnit(const DICompileUnit *N,
Record.push_back(N->getSplitDebugInlining());
Record.push_back(N->getDebugInfoForProfiling());
Record.push_back((unsigned)N->getNameTableKind());
- Record.push_back(N->getRangesBaseAddress());
Stream.EmitRecord(bitc::METADATA_COMPILE_UNIT, Record, Abbrev);
Record.clear();
diff --git a/llvm/test/Assembler/dicompileunit.ll b/llvm/test/Assembler/dicompileunit.ll
index fcf64240fb0e..c1683e2d630b 100644
--- a/llvm/test/Assembler/dicompileunit.ll
+++ b/llvm/test/Assembler/dicompileunit.ll
@@ -16,13 +16,13 @@
!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, rangesBaseAddress: true)
+; 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)
!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, rangesBaseAddress: true)
+ globals: !5, imports: !6, macros: !7, dwoId: 42, splitDebugInlining: true)
; 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 147d20e5b9f7..37ed4a76fd8c 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, rangesBaseAddress: 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, debugBaseAddress: 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