Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Nov 12, 2020
1 parent cdbbcf7 commit 03c0e7e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions cranelift/simplejit/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,14 @@ impl<'simple_jit_backend> Module for SimpleJITModule {
unsafe {
std::ptr::write(self.function_got_entries[id].unwrap().as_ptr(), ptr);
}
self.compiled_functions[id].as_ref().unwrap().perform_relocations(
|name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name),
|name| self.get_got_address(name),
|name| self.get_plt_address(name),
);
self.compiled_functions[id]
.as_ref()
.unwrap()
.perform_relocations(
|name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name),
|name| self.get_got_address(name),
|name| self.get_plt_address(name),
);

Ok(ModuleCompiledFunction { size: code_size })
}
Expand Down Expand Up @@ -618,11 +621,14 @@ impl<'simple_jit_backend> Module for SimpleJITModule {
unsafe {
std::ptr::write(self.function_got_entries[id].unwrap().as_ptr(), ptr);
}
self.compiled_functions[id].as_ref().unwrap().perform_relocations(
|name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name),
|name| self.get_got_address(name),
|name| self.get_plt_address(name),
);
self.compiled_functions[id]
.as_ref()
.unwrap()
.perform_relocations(
|name| unreachable!("non GOT or PLT relocation in function {} to {}", id, name),
|name| self.get_got_address(name),
|name| self.get_plt_address(name),
);

Ok(ModuleCompiledFunction { size: total_size })
}
Expand Down

0 comments on commit 03c0e7e

Please sign in to comment.