[llvm] 8feff8d - [DebugInfo] Fix a comment and a variable name. NFC.
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 01:05:07 PDT 2020
Author: Igor Kudrin
Date: 2020-08-03T15:04:00+07:00
New Revision: 8feff8d14f75aafe4af77a6295d59d28e7a72829
URL: https://github.com/llvm/llvm-project/commit/8feff8d14f75aafe4af77a6295d59d28e7a72829
DIFF: https://github.com/llvm/llvm-project/commit/8feff8d14f75aafe4af77a6295d59d28e7a72829.diff
LOG: [DebugInfo] Fix a comment and a variable name. NFC.
DebugLocListIndex keeps the index of an entry list, not the offset.
Differential Revision: https://reviews.llvm.org/D84093
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 2de6569767f6..871977df7a2c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -678,9 +678,9 @@ DIE *DwarfCompileUnit::constructVariableDIEImpl(const DbgVariable &DV,
// Add variable address.
- unsigned Offset = DV.getDebugLocListIndex();
- if (Offset != ~0U) {
- addLocationList(*VariableDie, dwarf::DW_AT_location, Offset);
+ unsigned Index = DV.getDebugLocListIndex();
+ if (Index != ~0U) {
+ addLocationList(*VariableDie, dwarf::DW_AT_location, Index);
auto TagOffset = DV.getDebugLocListTagOffset();
if (TagOffset)
addUInt(*VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1,
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 2587ee61b059..34364134d92a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -114,7 +114,7 @@ class DbgEntity {
///
/// Variables that have been optimized out use none of these fields.
class DbgVariable : public DbgEntity {
- /// Offset in DebugLocs.
+ /// Index of the entry list in DebugLocs.
unsigned DebugLocListIndex = ~0u;
/// DW_OP_LLVM_tag_offset value from DebugLocs.
Optional<uint8_t> DebugLocListTagOffset;
More information about the llvm-commits
mailing list