Treat undef bytes as equal to any other byte
This commit is contained in:
parent
964c58a7d9
commit
dfa4c01b2e
6 changed files with 40 additions and 7 deletions
|
@ -64,6 +64,11 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
|||
if type_is_pointer(typ) { self.context.new_null(typ) } else { self.const_int(typ, 0) }
|
||||
}
|
||||
|
||||
fn is_undef(&self, _val: RValue<'gcc>) -> bool {
|
||||
// FIXME: actually check for undef
|
||||
false
|
||||
}
|
||||
|
||||
fn const_undef(&self, typ: Type<'gcc>) -> RValue<'gcc> {
|
||||
let local = self.current_func.borrow().expect("func").new_local(None, typ, "undefined");
|
||||
if typ.is_struct().is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue