[PATCH] D43943: [DEBUGINFO] Add flag for DWARF2 to use sections as references.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 21 06:33:02 PDT 2018
ABataev added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:320
+ // Use sections as references in DWARF v2.
+ UseSectionsAsReferences =
----------------
echristo wrote:
> Why?
Removed
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:751
if (unsigned NumRanges = TheCU.getRanges().size()) {
- if (NumRanges > 1)
+ if (NumRanges > 1 && !useSectionsAsReferences())
// A DW_AT_low_pc attribute may also be specified in combination with
----------------
echristo wrote:
> Can you explain why this one is necessary?
It was fixed already in another patch
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1579-1583
+ if (useSectionsAsReferences()) {
+ Asm->EmitLabelPlusOffset(TheU->getSection()->getBeginSymbol(),
+ TheU->getDebugSectionOffset(),
+ Asm->MAI->getCodePointerSize());
+ } else {
----------------
echristo wrote:
> Let's refactor this into a "DwarfEmitOffset" function and use it in all of the places we want to emit a label plus an offset, then this becomes a two line patch.
Ok, will do
Repository:
rL LLVM
https://reviews.llvm.org/D43943
More information about the llvm-commits
mailing list