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)
commitdf29a1035944a6cc97e419b8e693deef8735b7fa
tree43d971aa12044d902be71bd71bc4f45c13809306
parentb39cae9b15065f6c964344f11f8e13fbf4a3b4d8
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209165 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/concrete_out_of_line.ll