[PATCH] Fixed debug info generation for function static variables, typedef, and records

Paul Robinson Paul_Robinson at playstation.sony.com
Thu May 21 14:24:26 PDT 2015


I don't claim to be deeply familiar with this code, but it looks like your patch does two things: first, refactor how we eliminate redundant/useless lexical blocks (doing it after processing everything else, instead of right away); second, make sure global (static) variables are attached to the correct scope.
The refactoring part should probably be done as its own patch first; that patch should refer to a test that shows we eliminate redundant scopes correctly, or add one if we don't already have such a test.
Then a follow-on patch would correct how globals are attached to their scopes.


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:550
@@ +549,3 @@
+    // parent instead, as this scope would serve no purpose.
+    bool Skip = Die->getAbbrev().getTag() == dwarf::DW_TAG_lexical_block;
+    for (auto &Child : Die->getChildren()) {
----------------
"Dies" is a vector of compile units, which will never have DW_TAG_lexical_block.  You would need to be doing a depth-first traversal of lexical blocks.

http://reviews.llvm.org/D9758

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list