@@ -565,12 +565,13 @@ function add_argument_metadata!(@nospecialize(job::CompilerJob), mod::LLVM.Modul
565
565
md = Metadata[]
566
566
567
567
# argument index
568
- push! (md, Metadata (ConstantInt (Int32 (arg. codegen. i- 1 ); ctx)))
568
+ @assert arg. codegen. i == i
569
+ push! (md, Metadata (ConstantInt (Int32 (i- 1 ); ctx)))
569
570
570
571
push! (md, MDString (" air.buffer" ; ctx))
571
572
572
573
push! (md, MDString (" air.location_index" ; ctx))
573
- push! (md, Metadata (ConstantInt (Int32 (arg . codegen . i- 1 ); ctx)))
574
+ push! (md, Metadata (ConstantInt (Int32 (i- 1 ); ctx)))
574
575
575
576
# XXX : unknown
576
577
push! (md, Metadata (ConstantInt (Int32 (1 ); ctx)))
@@ -603,14 +604,16 @@ function add_argument_metadata!(@nospecialize(job::CompilerJob), mod::LLVM.Modul
603
604
604
605
arg_info = Metadata[]
605
606
606
- push! (arg_info, Metadata (ConstantInt (Int32 (length ( parameters (entry)) - i ); ctx)))
607
+ push! (arg_info, Metadata (ConstantInt (Int32 (i - 1 ); ctx)))
607
608
push! (arg_info, MDString (" air.$intr_fn " ; ctx))
608
609
609
610
push! (arg_info, MDString (" air.arg_type_name" ; ctx))
610
611
push! (arg_info, MDString (argument_type_name (llvmtype (intr_arg)); ctx))
611
612
612
613
arg_info = MDNode (arg_info; ctx)
613
614
push! (arg_infos, arg_info)
615
+
616
+ i += 1
614
617
end
615
618
arg_infos = MDNode (arg_infos; ctx)
616
619
0 commit comments