[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)
commit37cb5f1c2db9f42d29f26b215585f56bb64ae4f5
treed3fe9f98cc8bbdeea7686b22b21ac1769dbf7ebb
parent5020a9198dc730a34f5f6de58735e8af0965746f
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241153 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/iterator_range.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
test/DebugInfo/lexical-block.ll [new file with mode: 0644]