[DWARF] Fix debug info generation for function static variables, typedefs, and records
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 1 Jul 2015 12:33:11 +0000 (12:33 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 1 Jul 2015 12:33:11 +0000 (12:33 +0000)
commit01e8185c31f323e288f030b0eff8584f535637a5
treefec14a98a0d7a0844c1a0659205d594e889b84ba
parent21a3c184436acff043ed543d95938ebbfa382990
[DWARF] Fix debug info generation for function static variables, typedefs, and records

Function static variables, typedefs and records (class, struct or union) declared inside
a lexical scope were associated with the function as their parent scope, rather than the
lexical scope they are defined or declared in.

This fixes PR19238

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D9758

llvm-svn: 241153
llvm/include/llvm/ADT/iterator_range.h
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
llvm/test/DebugInfo/lexical-block.ll [new file with mode: 0644]