[PATCH] D96827: [DWARF] Check for AddrOffsetSectionBase to work with DWO Units.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 13:41:28 PST 2021


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good - just a couple of minor fixes to make before committing.

(I assume by your patch that this is only reproducible with a linked binary? please confirm that (in a comment here) before committing)



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:201-203
+    if (IsDWO && hasSingleElement(R)) {
       return (*R.begin())->getAddrOffsetSectionItem(Index);
+    }
----------------
Drop the {} around single line block. ( https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements )


================
Comment at: llvm/test/DebugInfo/Inputs/splitdwarf-single-issue.cpp:1-12
+__attribute__((nodebug)) __attribute__((optnone)) void f1() {
+}
+
+__attribute__((always_inline)) inline void f2() {
+
+  f1();
+}
----------------
Probably move this inline in the .test file - easier to read in one place and understand why the behavior being tested is what it is based on the input.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96827/new/

https://reviews.llvm.org/D96827



More information about the llvm-commits mailing list