Closed
Description
We can set this in arbitrary metadata, and then write an LLVM pass to consume it and mark them as non-null.
This is awful:
pub fn foo(x: &int) -> bool {
Some(x) == None
}
; Function Attrs: nounwind readonly uwtable
define i8 @_ZN3foo19h6e99b0040329bc59af4v0.0E({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone, i64*) unnamed_addr #0 {
entry-block:
%2 = icmp eq i64* %1, null
%. = zext i1 %2 to i8
ret i8 %.
}