Skip to content

Commit 0c51149

Browse files
committed
mark non-immediate by-value parameters as non-null
1 parent 20a4151 commit 0c51149

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,7 @@ pub fn get_fn_llvm_attributes(ccx: &CrateContext, fn_ty: ty::t) -> Vec<(uint, u6
17661766
if !type_is_immediate(ccx, t) {
17671767
attrs.push((idx, lib::llvm::NoAliasAttribute as u64));
17681768
attrs.push((idx, lib::llvm::NoCaptureAttribute as u64));
1769+
attrs.push((idx, lib::llvm::NonNullAttribute as u64));
17691770
}
17701771
}
17711772
}

0 commit comments

Comments
 (0)