[clang] [clang]MveEmitter:Pass Args as const references (PR #89202)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 03:24:22 PDT 2024


https://github.com/aniplcc created https://github.com/llvm/llvm-project/pull/89202

Closes  #89192

>From bd5b445b9a1fe6ff465ebc0ca51d3833ab0c9a3c Mon Sep 17 00:00:00 2001
From: aniplcc <aniplccode at gmail.com>
Date: Thu, 18 Apr 2024 15:38:55 +0530
Subject: [PATCH] [clang]MveEmitter:Update args with const references

---
 clang/utils/TableGen/MveEmitter.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 88e7b6e8546595..23c1646fa82623 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -660,7 +660,7 @@ class IRBuilderResult : public Result {
   std::map<unsigned, std::string> IntegerArgs;
   IRBuilderResult(StringRef CallPrefix, std::vector<Ptr> Args,
                   std::set<unsigned> AddressArgs,
-                  std::map<unsigned, std::string> IntegerArgs)
+                  const std::map<unsigned, std::string> &IntegerArgs)
       : CallPrefix(CallPrefix), Args(Args), AddressArgs(AddressArgs),
         IntegerArgs(IntegerArgs) {}
   void genCode(raw_ostream &OS,
@@ -728,7 +728,7 @@ class IRIntrinsicResult : public Result {
   std::vector<const Type *> ParamTypes;
   std::vector<Ptr> Args;
   IRIntrinsicResult(StringRef IntrinsicID, std::vector<const Type *> ParamTypes,
-                    std::vector<Ptr> Args)
+                    const std::vector<Ptr> &Args)
       : IntrinsicID(std::string(IntrinsicID)), ParamTypes(ParamTypes),
         Args(Args) {}
   void genCode(raw_ostream &OS,



More information about the cfe-commits mailing list