summaryrefslogtreecommitdiff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-12 07:34:14 -0600
committerTom Tromey <tom@tromey.com>2018-11-29 13:04:09 -0700
commitfb204cb92f5da2cd0b630ee4b6be85b02404823e (patch)
tree4586fecc69bb15a73ec5337261eef0a3cb840151 /src/rustllvm/RustWrapper.cpp
parent0c1dc62c1ec3c23dcb5e90500a2b3b25817ad03a (diff)
downloadrust-fb204cb92f5da2cd0b630ee4b6be85b02404823e.tar.gz
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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index b6e07942f86..908518d87a3 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -824,11 +824,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