Skip to main content

extract_const_bytes_from_operand

Function extract_const_bytes_from_operand 

Source
pub fn extract_const_bytes_from_operand<'tcx>(
    tcx: TyCtxt<'tcx>,
    operand: &Operand<'tcx>,
) -> Option<Vec<u8>>
Expand description

Try to extract raw bytes from a MIR constant operand that is a reference to a byte array/slice (e.g. b"hello\0"). Returns the byte values. Used by the VM to populate byte-level tracking for constant C strings.