Skip to content

Commit 49e047f

Browse files
committed
Treat undef bytes as equal to any other byte
1 parent 4600047 commit 49e047f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/common.rs

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
6464
if type_is_pointer(typ) { self.context.new_null(typ) } else { self.const_int(typ, 0) }
6565
}
6666

67+
fn is_undef(&self, _val: RValue<'gcc>) -> bool {
68+
// FIXME: actually check for undef
69+
false
70+
}
71+
6772
fn const_undef(&self, typ: Type<'gcc>) -> RValue<'gcc> {
6873
let local = self.current_func.borrow().expect("func").new_local(None, typ, "undefined");
6974
if typ.is_struct().is_some() {

0 commit comments

Comments
 (0)