MCPcopy Index your code
hub / github.com/encounter/objdiff / arg_to_string

Function arg_to_string

objdiff-core/src/diff/code.rs:223–231  ·  view source on GitHub ↗
(arg: &InstructionArg, reloc: Option<ResolvedRelocation>)

Source from the content-addressed store, hash-verified

221}
222
223fn arg_to_string(arg: &InstructionArg, reloc: Option<ResolvedRelocation>) -> String {
224 match arg {
225 InstructionArg::Value(arg) => arg.to_string(),
226 InstructionArg::Reloc => {
227 reloc.as_ref().map_or_else(|| "<unknown>".to_string(), |r| r.symbol.name.clone())
228 }
229 InstructionArg::BranchDest(arg) => arg.to_string(),
230 }
231}
232
233fn resolve_branches(ops: &[InstructionRef], rows: &mut [InstructionDiffRow]) {
234 let mut branch_idx = 0u32;

Callers 1

diff_instructionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected