mark non-immediate by-value parameters as non-null

This commit is contained in:
Daniel Micay 2014-05-26 02:59:19 -04:00
parent 20a41519fd
commit 0c51149ac9

View File

@ -1766,6 +1766,7 @@ pub fn get_fn_llvm_attributes(ccx: &CrateContext, fn_ty: ty::t) -> Vec<(uint, u6
if !type_is_immediate(ccx, t) {
attrs.push((idx, lib::llvm::NoAliasAttribute as u64));
attrs.push((idx, lib::llvm::NoCaptureAttribute as u64));
attrs.push((idx, lib::llvm::NonNullAttribute as u64));
}
}
}