From fd875c3f5a027945095cde8605f775da9da1b839 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 7 Nov 2018 15:52:52 -0800 Subject: [PATCH] Pass TargetFrontendConfig by value rather than by reference. --- lib/codegen/src/isa/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/codegen/src/isa/mod.rs b/lib/codegen/src/isa/mod.rs index 20469bb6c0..f304cf09c3 100644 --- a/lib/codegen/src/isa/mod.rs +++ b/lib/codegen/src/isa/mod.rs @@ -179,17 +179,17 @@ pub struct TargetFrontendConfig { impl TargetFrontendConfig { /// Get the pointer type of this target. - pub fn pointer_type(&self) -> ir::Type { + pub fn pointer_type(self) -> ir::Type { ir::Type::int(u16::from(self.pointer_bits())).unwrap() } /// Get the width of pointers on this target, in units of bits. - pub fn pointer_bits(&self) -> u8 { + pub fn pointer_bits(self) -> u8 { self.pointer_width.bits() } /// Get the width of pointers on this target, in units of bytes. - pub fn pointer_bytes(&self) -> u8 { + pub fn pointer_bytes(self) -> u8 { self.pointer_width.bytes() } }