DebugInfo: Fix missing inlined_subroutines caused by r208748.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 19 May 2014 21:54:31 +0000 (21:54 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 19 May 2014 21:54:31 +0000 (21:54 +0000)
commit48b056bab048a84d1cad5186721b1e9d94d7a2c0
tree0d105ead046e46e743248cfee3daa5ad280c3953
parent710c0ae7ded536444ee941da6999ce2073a23943
DebugInfo: Fix missing inlined_subroutines caused by r208748.

The check in DwarfDebug::constructScopeDIE was meant to consider inlined
subroutines as any non-top-level scope that was a subprogram. Instead of
checking "not top level scope" it was checking if the /subprogram's/
scope was non-top-level.

Fix this and beef up a test case to demonstrate some of the missing
inlined_subroutines are no longer missing.

In the course of fixing this I also found that r208748 (with this fix)
found one /extra/ inlined_subroutine in concrete_out_of_line.ll due to
two inlined_subroutines having the same inlinedAt location. The previous
implementation was collapsing these into a single inlined subroutine.

I'm not sure what the original code was that created this .ll file so
I'm not sure if this actually happens in practice today. Since we
deliberately include column information to disambiguate two calls on the
same line, that may've addressed this bug in the frontend, but it's good
to know that workaround isn't necessary for this particular case
anymore.

llvm-svn: 209165
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/concrete_out_of_line.ll