summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Target
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-01-01 15:55:14 -0800
committerFangrui Song <maskray@google.com>2020-01-01 16:06:04 -0800
commiteeef50b1fee91dbe993187324003d2665ceae331 (patch)
tree15f68eb8fac2485d6624d4962f011dc8d64bce73 /mlir/lib/Target
parent681b1be774964a804beabfb7c5e3bdab8f979e4a (diff)
downloadbcm5719-llvm-eeef50b1fee91dbe993187324003d2665ceae331.tar.gz
bcm5719-llvm-eeef50b1fee91dbe993187324003d2665ceae331.zip
[mlir] Fix -Wrange-loo-analysis warnings
for (const auto &x : llvm::zip(..., ...)) -> for (auto x : llvm::zip(..., ...)) The return type of zip() is a wrapper that wraps a tuple of references. > warning: loop variable 'p' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<long> &, ArrayRef<long> &>' does not return a reference [-Wrange-loop-analysis]
Diffstat (limited to 'mlir/lib/Target')
-rw-r--r--mlir/lib/Target/LLVMIR/ModuleTranslation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
index e3c0768ef33..65081f45d02 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -409,7 +409,7 @@ LogicalResult ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
// Add function arguments to the value remapping table.
// If there was noalias info then we decorate each argument accordingly.
unsigned int argIdx = 0;
- for (const auto &kvp : llvm::zip(func.getArguments(), llvmFunc->args())) {
+ for (auto kvp : llvm::zip(func.getArguments(), llvmFunc->args())) {
llvm::Argument &llvmArg = std::get<1>(kvp);
BlockArgument mlirArg = std::get<0>(kvp);
OpenPOWER on IntegriCloud