Auto merge of #55010 - tromey:Bug-9224-generic-parameters, r=michaelwoerister
Add template parameter debuginfo to generic types This changes debuginfo generation to add template parameters to generic types. With this change the DWARF now has DW_TAG_template_type_param for types, not just for functions, like: <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type) <40e> DW_AT_name : (indirect string, offset: 0x375): Generic<i32> <412> DW_AT_byte_size : 4 <413> DW_AT_alignment : 4 ... <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param) <420> DW_AT_type : <0x42a> <424> DW_AT_name : (indirect string, offset: 0xa65e): T Closes #9224
This commit is contained in:
commit
9cd3bef4cf
9 changed files with 115 additions and 18 deletions
|
@ -832,11 +832,13 @@ LLVMRustDIBuilderCreateNameSpace(LLVMRustDIBuilderRef Builder,
|
|||
}
|
||||
|
||||
extern "C" void
|
||||
LLVMRustDICompositeTypeSetTypeArray(LLVMRustDIBuilderRef Builder,
|
||||
LLVMMetadataRef CompositeTy,
|
||||
LLVMMetadataRef TyArray) {
|
||||
LLVMRustDICompositeTypeReplaceArrays(LLVMRustDIBuilderRef Builder,
|
||||
LLVMMetadataRef CompositeTy,
|
||||
LLVMMetadataRef Elements,
|
||||
LLVMMetadataRef Params) {
|
||||
DICompositeType *Tmp = unwrapDI<DICompositeType>(CompositeTy);
|
||||
Builder->replaceArrays(Tmp, DINodeArray(unwrap<MDTuple>(TyArray)));
|
||||
Builder->replaceArrays(Tmp, DINodeArray(unwrap<MDTuple>(Elements)),
|
||||
DINodeArray(unwrap<MDTuple>(Params)));
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue