MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / assert_generic

Function assert_generic

cranelift/object/src/unwind.rs:226–243  ·  view source on GitHub ↗
(flags: RelocationFlags, expected_kind: RelocationKind, expected_size: u8)

Source from the content-addressed store, hash-verified

224
225 #[track_caller]
226 fn assert_generic(flags: RelocationFlags, expected_kind: RelocationKind, expected_size: u8) {
227 match flags {
228 RelocationFlags::Generic {
229 kind,
230 encoding,
231 size,
232 } => {
233 assert_eq!(kind, expected_kind, "wrong relocation kind");
234 assert_eq!(
235 encoding,
236 RelocationEncoding::Generic,
237 "wrong relocation encoding"
238 );
239 assert_eq!(size, expected_size, "wrong relocation size in bits");
240 }
241 other => panic!("expected RelocationFlags::Generic, got {other:?}"),
242 }
243 }
244
245 #[test]
246 fn missing_eh_pe_falls_back_to_absolute_pointer() {

Callers 4

pcrel_sdata4_on_elfFunction · 0.85
pcrel_sdata4_on_coffFunction · 0.85

Calls

no outgoing calls

Tested by 4

pcrel_sdata4_on_elfFunction · 0.68
pcrel_sdata4_on_coffFunction · 0.68