From e210656c68a2a91c6fa4facd0286066b2bc6ee3e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 4 Jun 2024 19:17:26 -0400 Subject: [PATCH] llvm/include/llvm/CodeGenTypes/LowLevelType.h: 2 * pointless copy (#94378) modified parameter for code quality --- llvm/include/llvm/CodeGenTypes/LowLevelType.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h index 62ee28cfac99c..c66b98dceae5f 100644 --- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h +++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h @@ -68,7 +68,7 @@ class LLT { } /// Get a low-level vector of some number of elements and element type. - static constexpr LLT vector(ElementCount EC, LLT ScalarTy) { + static constexpr LLT vector(ElementCount EC, const LLT &ScalarTy) { assert(!EC.isScalar() && "invalid number of vector elements"); assert(!ScalarTy.isVector() && "invalid vector element type"); return LLT{ScalarTy.isPointer(), @@ -121,7 +121,7 @@ class LLT { return vector(ElementCount::getScalable(MinNumElements), ScalarTy); } - static constexpr LLT scalarOrVector(ElementCount EC, LLT ScalarTy) { + static constexpr LLT scalarOrVector(ElementCount EC, const LLT &ScalarTy) { return EC.isScalar() ? ScalarTy : LLT::vector(EC, ScalarTy); }