Debug Info: Use identifier to reference DIType in base type field of
ptr_to_member. We introduce a new class DITypeRef that represents a reference to a DIType. It wraps around a Value*, which can be either an identifier in MDString or an actual MDNode. The class has a helper function "resolve" that finds the actual MDNode for a given DITypeRef. We specialize getFieldAs to return a field that is a reference to a DIType. To correctly access the base type field of ptr_to_member, getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef. Also add a typedef for DITypeIdentifierMap and a helper generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually populate the map. Verifier is updated accordingly. llvm-svn: 190081
Showing
- llvm/include/llvm/DebugInfo.h 30 additions, 2 deletionsllvm/include/llvm/DebugInfo.h
- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp 1 addition, 1 deletionllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp 6 additions, 0 deletionsllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h 7 additions, 0 deletionsllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
- llvm/lib/IR/DIBuilder.cpp 13 additions, 1 deletionllvm/lib/IR/DIBuilder.cpp
- llvm/lib/IR/DebugInfo.cpp 70 additions, 2 deletionsllvm/lib/IR/DebugInfo.cpp
- llvm/test/DebugInfo/tu-member-pointer.ll 29 additions, 0 deletionsllvm/test/DebugInfo/tu-member-pointer.ll
Loading
Please register or sign in to comment