Skip checks for common types with alignment 1
This commit is contained in:
parent
a71b808d77
commit
67540ec950
1 changed files with 7 additions and 0 deletions
|
@ -99,6 +99,13 @@ impl<'tcx, 'a> Visitor<'tcx> for PointerFinder<'tcx, 'a> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [self.tcx.types.bool, self.tcx.types.i8, self.tcx.types.u8, self.tcx.types.str_]
|
||||||
|
.contains(&pointee_ty)
|
||||||
|
{
|
||||||
|
debug!("Trivially aligned pointee type: {:?}", pointer_ty);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.pointers.push((pointer, pointee_ty))
|
self.pointers.push((pointer, pointee_ty))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue