diff --git a/ptx/src/pass/llvm/emit.rs b/ptx/src/pass/llvm/emit.rs index 5180b13..0e92c8c 100644 --- a/ptx/src/pass/llvm/emit.rs +++ b/ptx/src/pass/llvm/emit.rs @@ -123,10 +123,9 @@ impl<'a, 'input> ModuleEmitContext<'a, 'input> { let fn_type = get_function_type( self.context, method.return_arguments.iter().map(|v| &v.info.v_type), - method - .input_arguments - .iter() - .map(|v| get_input_argument_type(self.context, &v.info.v_type, v.info.state_space)), + method.input_arguments.iter().map(|v| { + get_input_argument_type(self.context, &v.info.v_type, v.info.state_space) + }), )?; fn_ = unsafe { LLVMAddFunction(self.module, name.as_ptr(), fn_type) }; self.emit_fn_attribute(fn_, "amdgpu-unsafe-fp-atomics", "true"); diff --git a/ptx_parser/src/ast.rs b/ptx_parser/src/ast.rs index 62f412e..84d5f57 100644 --- a/ptx_parser/src/ast.rs +++ b/ptx_parser/src/ast.rs @@ -1004,7 +1004,10 @@ pub enum MultiVariable { name: ID, count: u32, }, - Names { info: VariableInfo, names: Vec }, + Names { + info: VariableInfo, + names: Vec, + }, } #[derive(Clone)] diff --git a/ptx_parser/src/lib.rs b/ptx_parser/src/lib.rs index 8029f06..c830b6f 100644 --- a/ptx_parser/src/lib.rs +++ b/ptx_parser/src/lib.rs @@ -993,7 +993,7 @@ fn multi_variable<'a, 'input: 'a>( state_space, array_init: Vec::new(), }, - name: name, + name, count, }); } @@ -1019,9 +1019,9 @@ fn multi_variable<'a, 'input: 'a>( Ok(MultiVariable::Names { info: VariableInfo { align, - v_type: Type::maybe_array(vector, type_, array_dimensions.clone()), + v_type: Type::maybe_array(vector, type_, array_dimensions), state_space, - array_init: initializer.clone().unwrap_or(Vec::new()), + array_init: initializer.unwrap_or(Vec::new()), }, names, })