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
|
@ -126,6 +126,10 @@ impl<'ll, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
unsafe { llvm::LLVMGetUndef(t) }
|
||||
}
|
||||
|
||||
fn is_undef(&self, v: &'ll Value) -> bool {
|
||||
unsafe { llvm::LLVMIsUndef(v) == True }
|
||||
}
|
||||
|
||||
fn const_poison(&self, t: &'ll Type) -> &'ll Value {
|
||||
unsafe { llvm::LLVMGetPoison(t) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue