[PATCH] D84092: [DebugInfo] Make DIELocList::SizeOf() more explicit. NFCI.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 01:05:10 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e10a18972a4: [DebugInfo] Make DIELocList::SizeOf() more explicit. NFCI. (authored by ikudrin).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84092/new/
https://reviews.llvm.org/D84092
Files:
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
Index: llvm/lib/CodeGen/AsmPrinter/DIE.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -809,13 +809,17 @@
//===----------------------------------------------------------------------===//
unsigned DIELocList::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
- if (Form == dwarf::DW_FORM_loclistx)
+ switch (Form) {
+ case dwarf::DW_FORM_loclistx:
return getULEB128Size(Index);
- if (Form == dwarf::DW_FORM_data4)
+ case dwarf::DW_FORM_data4:
return 4;
- if (Form == dwarf::DW_FORM_sec_offset)
+ case dwarf::DW_FORM_sec_offset:
+ // FIXME: add support for DWARF64
return 4;
- return AP->MAI->getCodePointerSize();
+ default:
+ llvm_unreachable("DIE Value form not supported yet");
+ }
}
/// EmitValue - Emit label value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84092.282518.patch
Type: text/x-patch
Size: 871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200803/ff4eac85/attachment.bin>
More information about the llvm-commits
mailing list