]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
Debug Info: add a helper function createAndAddDIE.
authorManman Ren <manman.ren@gmail.com>
Tue, 29 Oct 2013 00:53:03 +0000 (00:53 +0000)
committerManman Ren <manman.ren@gmail.com>
Tue, 29 Oct 2013 00:53:03 +0000 (00:53 +0000)
commit1a5e787f701c45ac2487d400faf6f6d4def6dcef
treeef1d9648cbd8294600348e49184d3ea3a8c80272
parent39f62fa3dd1f683288e67ba58bef785b2dcaa98c
Debug Info: add a helper function createAndAddDIE.

It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
sure that bookkeeping is done at the earliest time and we should not see
parentless DIEs if all constructions of DIEs go through this helper function.

Later on, we can use an allocator for DIE allocation, and will only need to
change createAndAddDIE instead of modifying all the "new DIE(".

Reviewed off-list by Eric.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193566 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h