Skip to content
Snippets Groups Projects
Commit 83657b24 authored by rarbore2's avatar rarbore2
Browse files

Generate LLVM undef on CPU

parent ec779c5f
No related branches found
No related tags found
1 merge request!110Generate LLVM undef on CPU
......@@ -536,6 +536,17 @@ impl<'a> CPUContext<'a> {
self.get_value(collect, true)
)?;
}
Node::Undef { ty } => {
let body = &mut blocks.get_mut(&self.bbs.0[id.idx()]).unwrap().body;
let ty = self.get_type(ty);
write!(
body,
" {} = bitcast {} undef to {}\n",
self.get_value(id, false),
ty,
ty
)?;
}
_ => panic!("PANIC: Can't lower {:?}.", self.function.nodes[id.idx()]),
}
Ok(())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment