Debug Info: Use DIScopeRef for DIType::getContext.
authorManman Ren <manman.ren@gmail.com>
Mon, 9 Sep 2013 19:47:11 +0000 (19:47 +0000)
committerManman Ren <manman.ren@gmail.com>
Mon, 9 Sep 2013 19:47:11 +0000 (19:47 +0000)
commit116868eaddccd6080ca0c564c6d7e44ebebcb3c9
treef968356b1270e7622ee41ab446dccab2ba7b7c0f
parent7a8b6ca2d16c529dfa3e3f1188ec070454850b6f
Debug Info: Use DIScopeRef for DIType::getContext.

In DIBuilder, the context field of a TAG_member is updated to use the
scope reference. Verifier is updated accordingly.

DebugInfoFinder now needs to generate a type identifier map to have
access to the actual scope. Same applies for BreakpointPrinter.

processModule of DebugInfoFinder is called during initialization phase
of the verifier to make sure the type identifier map is constructed early
enough.

We are now able to unique a simple class as demonstrated by the added
testing case.

llvm-svn: 190334
llvm/include/llvm/DebugInfo.h
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/IR/DIBuilder.cpp
llvm/lib/IR/DebugInfo.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/Linker/type-unique-simple-a.ll [new file with mode: 0644]
llvm/test/Linker/type-unique-simple-b.ll [new file with mode: 0644]
llvm/tools/opt/opt.cpp