Remove unused SourceLoc in many Mach data structures (#4180)

* Remove unused srcloc in MachReloc

* Remove unused srcloc in MachTrap

* Use `into_iter` on array in bench code to suppress a warning

* Remove unused srcloc in MachCallSite
This commit is contained in:
Benjamin Bouvier
2022-05-23 18:27:28 +02:00
committed by GitHub
parent 32622b3e6f
commit 6e828df632
11 changed files with 82 additions and 222 deletions

View File

@@ -2,7 +2,7 @@
use cranelift_codegen::binemit::{Addend, CodeOffset, Reloc};
use cranelift_codegen::entity::PrimaryMap;
use cranelift_codegen::ir::{self, SourceLoc};
use cranelift_codegen::ir;
use cranelift_codegen::MachReloc;
use std::borrow::ToOwned;
use std::boxed::Box;
@@ -66,7 +66,6 @@ impl DataDescription {
.map(move |&(offset, id)| MachReloc {
kind: pointer_reloc,
offset,
srcloc: SourceLoc::default(),
name: self.function_decls[id].clone(),
addend: 0,
});
@@ -76,7 +75,6 @@ impl DataDescription {
.map(move |&(offset, id, addend)| MachReloc {
kind: pointer_reloc,
offset,
srcloc: SourceLoc::default(),
name: self.data_decls[id].clone(),
addend,
});