Have getOrCreateSubprogramDIE store the DIE for a subprogram
authorPeter Collingbourne <peter@pcc.me.uk>
Sun, 27 May 2012 18:36:44 +0000 (18:36 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Sun, 27 May 2012 18:36:44 +0000 (18:36 +0000)
commit27302f07393d4db22e8ad06ac2ad4e7f01370b17
treea46c6252aaeaad95d6cb339f833f510075c1a68a
parent908a831a9a1fb043bc4758d6712d78255099ae51
Have getOrCreateSubprogramDIE store the DIE for a subprogram
definition in the map before calling itself to retrieve the
DIE for the declaration.  Without this change, if this causes
getOrCreateSubprogramDIE to be recursively called on the definition,
it will create multiple DIEs for that definition.  Fixes PR12831.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157541 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
test/DebugInfo/X86/pr12831.ll [new file with mode: 0644]