]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/abi.rs
Auto merge of #52089 - eddyb:issue-51907, r=nagisa
[rust.git] / src / librustc_codegen_llvm / abi.rs
index b96e9b4300f0b624e8815e5aa1dd5e32cddb9d76..dbada85098b41b92bbf8cb614acb6a777b02d913 100644 (file)
@@ -588,8 +588,8 @@ fn llvm_type(&self, cx: &CodegenCx<'a, 'tcx>) -> Type {
                 PassMode::Ignore => continue,
                 PassMode::Direct(_) => arg.layout.immediate_llvm_type(cx),
                 PassMode::Pair(..) => {
-                    llargument_tys.push(arg.layout.scalar_pair_element_llvm_type(cx, 0));
-                    llargument_tys.push(arg.layout.scalar_pair_element_llvm_type(cx, 1));
+                    llargument_tys.push(arg.layout.scalar_pair_element_llvm_type(cx, 0, true));
+                    llargument_tys.push(arg.layout.scalar_pair_element_llvm_type(cx, 1, true));
                     continue;
                 }
                 PassMode::Cast(cast) => cast.llvm_type(cx),
@@ -672,11 +672,7 @@ fn apply_attrs_callsite(&self, bx: &Builder<'a, 'tcx>, callsite: ValueRef) {
                 layout::Int(..) if !scalar.is_bool() => {
                     let range = scalar.valid_range_exclusive(bx.cx);
                     if range.start != range.end {
-                        // FIXME(nox): This causes very weird type errors about
-                        // SHL operators in constants in stage 2 with LLVM 3.9.
-                        if unsafe { llvm::LLVMRustVersionMajor() >= 4 } {
-                            bx.range_metadata(callsite, range);
-                        }
+                        bx.range_metadata(callsite, range);
                     }
                 }
                 _ => {}