Debug Info: instead of calling addToContextOwner which constructs the context
authorManman Ren <manman.ren@gmail.com>
Tue, 29 Oct 2013 05:49:41 +0000 (05:49 +0000)
committerManman Ren <manman.ren@gmail.com>
Tue, 29 Oct 2013 05:49:41 +0000 (05:49 +0000)
commit6b713800ff03fdbb1d770d1e00af0e76041f3c03
tree462a07a6ac3170b391694ad292197834134f6ed2
parentb4e591a4a68649a286cd1b08312566db17758158
Debug Info: instead of calling addToContextOwner which constructs the context
after the DIE creation, we construct the context first.

This touches creation of namespaces and global variables. The purpose is to
handle all DIE creations similarly: constructs the context first, then creates
the DIE and immediately adds the DIE to its parent.

We use createAndAddDIE to wrap around "new DIE(".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193589 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
test/DebugInfo/X86/2010-08-10-DbgConstant.ll
test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
test/DebugInfo/X86/DW_TAG_friend.ll
test/DebugInfo/X86/empty-array.ll
test/DebugInfo/X86/enum-class.ll
test/DebugInfo/X86/fission-cu.ll
test/DebugInfo/X86/gnu-public-names.ll
test/DebugInfo/X86/nondefault-subrange-array.ll
test/DebugInfo/X86/objc-fwd-decl.ll
test/DebugInfo/X86/stringpool.ll
test/DebugInfo/X86/struct-loc.ll
test/DebugInfo/template-recursive-void.ll