[Mlir-commits] [mlir] 813156e - Apply clang-tidy fixes for performance-unnecessary-value-param in MLIRGen.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri Jan 14 10:08:55 PST 2022


Author: Mehdi Amini
Date: 2022-01-14T18:08:42Z
New Revision: 813156eaa96d2b5a0f5493698f2f2994aa0d699e

URL: https://github.com/llvm/llvm-project/commit/813156eaa96d2b5a0f5493698f2f2994aa0d699e
DIFF: https://github.com/llvm/llvm-project/commit/813156eaa96d2b5a0f5493698f2f2994aa0d699e.diff

LOG: Apply clang-tidy fixes for performance-unnecessary-value-param in MLIRGen.cpp (NFC)

Added: 
    

Modified: 
    mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    mlir/examples/toy/Ch7/mlir/MLIRGen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
index 591ae48db4f25..f00400ec6a992 100644
--- a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
@@ -92,7 +92,7 @@ class MLIRGenImpl {
   llvm::ScopedHashTable<StringRef, mlir::Value> symbolTable;
 
   /// Helper conversion for a Toy AST location to an MLIR location.
-  mlir::Location loc(Location loc) {
+  mlir::Location loc(const Location &loc) {
     return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
                                      loc.col);
   }

diff  --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
index 591ae48db4f25..f00400ec6a992 100644
--- a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
@@ -92,7 +92,7 @@ class MLIRGenImpl {
   llvm::ScopedHashTable<StringRef, mlir::Value> symbolTable;
 
   /// Helper conversion for a Toy AST location to an MLIR location.
-  mlir::Location loc(Location loc) {
+  mlir::Location loc(const Location &loc) {
     return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
                                      loc.col);
   }

diff  --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
index 35cd0bc106c2d..5260652aa6190 100644
--- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
@@ -92,7 +92,7 @@ class MLIRGenImpl {
   llvm::ScopedHashTable<StringRef, mlir::Value> symbolTable;
 
   /// Helper conversion for a Toy AST location to an MLIR location.
-  mlir::Location loc(Location loc) {
+  mlir::Location loc(const Location &loc) {
     return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
                                      loc.col);
   }

diff  --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
index 35cd0bc106c2d..5260652aa6190 100644
--- a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
@@ -92,7 +92,7 @@ class MLIRGenImpl {
   llvm::ScopedHashTable<StringRef, mlir::Value> symbolTable;
 
   /// Helper conversion for a Toy AST location to an MLIR location.
-  mlir::Location loc(Location loc) {
+  mlir::Location loc(const Location &loc) {
     return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
                                      loc.col);
   }

diff  --git a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
index 35cd0bc106c2d..5260652aa6190 100644
--- a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
@@ -92,7 +92,7 @@ class MLIRGenImpl {
   llvm::ScopedHashTable<StringRef, mlir::Value> symbolTable;
 
   /// Helper conversion for a Toy AST location to an MLIR location.
-  mlir::Location loc(Location loc) {
+  mlir::Location loc(const Location &loc) {
     return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
                                      loc.col);
   }

diff  --git a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
index 4663c94ee85b5..f49f808310917 100644
--- a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
@@ -112,7 +112,7 @@ class MLIRGenImpl {
   llvm::StringMap<std::pair<mlir::Type, StructAST *>> structMap;
 
   /// Helper conversion for a Toy AST location to an MLIR location.
-  mlir::Location loc(Location loc) {
+  mlir::Location loc(const Location &loc) {
     return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
                                      loc.col);
   }


        


More information about the Mlir-commits mailing list