@@ -34,8 +34,8 @@ use crate::builder::Builder;
3434use crate :: common:: { AsCCharPtr , CodegenCx } ;
3535use crate :: llvm;
3636use crate :: llvm:: debuginfo:: {
37- DIArray , DIBuilderBox , DIFile , DIFlags , DILexicalBlock , DILocation , DISPFlags , DIScope ,
38- DITemplateTypeParameter , DIType , DIVariable ,
37+ DIArray , DIBuilderBox , DIFile , DIFlags , DILexicalBlock , DILocation , DISPFlags , DIScope , DIType ,
38+ DIVariable ,
3939} ;
4040use crate :: value:: Value ;
4141
@@ -251,7 +251,7 @@ struct DebugLoc {
251251 col : u32 ,
252252}
253253
254- impl < ' ll > CodegenCx < ' ll , ' _ > {
254+ impl CodegenCx < ' _ , ' _ > {
255255 /// Looks up debug source information about a `BytePos`.
256256 // FIXME(eddyb) rename this to better indicate it's a duplicate of
257257 // `lookup_char_pos` rather than `dbg_loc`, perhaps by making
@@ -279,22 +279,6 @@ impl<'ll> CodegenCx<'ll, '_> {
279279 DebugLoc { file, line, col }
280280 }
281281 }
282-
283- fn create_template_type_parameter (
284- & self ,
285- name : & str ,
286- actual_type_metadata : & ' ll DIType ,
287- ) -> & ' ll DITemplateTypeParameter {
288- unsafe {
289- llvm:: LLVMRustDIBuilderCreateTemplateTypeParameter (
290- DIB ( self ) ,
291- None ,
292- name. as_c_char_ptr ( ) ,
293- name. len ( ) ,
294- actual_type_metadata,
295- )
296- }
297- }
298282}
299283
300284impl < ' ll , ' tcx > DebugInfoCodegenMethods < ' tcx > for CodegenCx < ' ll , ' tcx > {
@@ -499,10 +483,16 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
499483 kind. as_type ( ) . map ( |ty| {
500484 let actual_type = cx. tcx . normalize_erasing_regions ( cx. typing_env ( ) , ty) ;
501485 let actual_type_metadata = type_di_node ( cx, actual_type) ;
502- Some ( cx. create_template_type_parameter (
503- name. as_str ( ) ,
504- actual_type_metadata,
505- ) )
486+ let name = name. as_str ( ) ;
487+ unsafe {
488+ Some ( llvm:: LLVMRustDIBuilderCreateTemplateTypeParameter (
489+ DIB ( cx) ,
490+ None ,
491+ name. as_c_char_ptr ( ) ,
492+ name. len ( ) ,
493+ actual_type_metadata,
494+ ) )
495+ }
506496 } )
507497 } )
508498 . collect ( )
0 commit comments