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)
commit4d358b55fa82e937dd3acd099c0c009473c82c57
tree06ce212665140609d7e4306ae66411efdd07c6f8
parentf39c278384c21356489426375854a9a09fa16c61
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.

llvm-svn: 157541
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/test/DebugInfo/X86/pr12831.ll [new file with mode: 0644]