Make MachBackend::triple return &Triple

This avoids an unnecessary clone
This commit is contained in:
bjorn3
2022-01-03 19:47:33 +01:00
parent 4915162230
commit 8d1fc75b6b
6 changed files with 10 additions and 13 deletions

View File

@@ -98,8 +98,8 @@ impl MachBackend for AArch64Backend {
"aarch64"
}
fn triple(&self) -> Triple {
self.triple.clone()
fn triple(&self) -> &Triple {
&self.triple
}
fn flags(&self) -> &shared_settings::Flags {

View File

@@ -88,8 +88,8 @@ impl MachBackend for Arm32Backend {
"arm32"
}
fn triple(&self) -> Triple {
self.triple.clone()
fn triple(&self) -> &Triple {
&self.triple
}
fn flags(&self) -> &settings::Flags {

View File

@@ -101,8 +101,8 @@ impl MachBackend for S390xBackend {
"s390x"
}
fn triple(&self) -> Triple {
self.triple.clone()
fn triple(&self) -> &Triple {
&self.triple
}
fn flags(&self) -> &shared_settings::Flags {

View File

@@ -98,8 +98,8 @@ impl MachBackend for X64Backend {
"x64"
}
fn triple(&self) -> Triple {
self.triple.clone()
fn triple(&self) -> &Triple {
&self.triple
}
fn reg_universe(&self) -> &RealRegUniverse {