Auto merge of #33872 - nagisa:undef-is-llvm-for-sigsegv, r=eddyb
Fix handling of FFI arguments r? @EddyB @nikomatsakis or whoever else. cc @alexcrichton @rust-lang/core The strategy employed here was to essentially change code we generate from ```llvm %s = alloca %S ; potentially smaller than argument, but never larger %1 = bitcast %S* %s to { i64, i64 }* store { i64, i64 } %0, { i64, i64 }* %1, align 4 ``` to ```llvm %1 = alloca { i64, i64 } ; the copy of argument itself store { i64, i64 } %0, { i64, i64 }* %1, align 4 %s = bitcast { i64, i64 }* %1 to %S* ; potentially truncate by casting to a pointer of smaller type. ```
Showing
想要评论请 注册 或 登录