[PATCH] D11180: Fixed debug info generation for function static variables, typedef, and records
Amjad Aboud
amjad.aboud at intel.com
Sun Jul 26 00:19:36 PDT 2015
aaboud added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.h:239
@@ +238,3 @@
+ // Collection of abstract global variables.
+ DenseMap<const MDNode *, DIE *> AbstractGlobalVariables;
+ SmallVector<std::pair<const MDNode *, DIE *>, 32> ConcreteGlobalVariables;
----------------
dblaikie wrote:
> I can't quite follow it - why are these two data structures necessary now (but weren't necessary prior to your proposed change)?
In my original solution I did not consider optimized code, especially inline functions.
Now as I need to take care of these cases, it led us to the need for handling function static variables for function been inlined.
Notice that in the today implementation, where the function static variable is always associated to the function regardless of the lexical block it is defined in, the function static variable is being defined once even when the function is being inlined.
This means that you will not have access to that variable from the caller function.
With this patch, I am not just solving the static lexical block issue but also assure have access to that static variable from the caller function.
If you think that I should not bother solving this debugging issue, I might be able to do less changes and keep the current behavior (of losing debug info when inline).
What do you think?
Repository:
rL LLVM
http://reviews.llvm.org/D11180
More information about the llvm-commits
mailing list