From 69760d421dddbb45cfccf7f18f6d20d89680c30e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 1 Jul 2020 12:37:47 +0100 Subject: [PATCH] Pass stripNonLineTableDebugInfo remapDebugLoc lambda DebugLoc arg by const reference not value. Noticed by clang-tidy performance-unnecessary-value-param warning. --- lib/IR/DebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 254b6fe563e..190b220dc9a 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -647,7 +647,7 @@ bool llvm::stripNonLineTableDebugInfo(Module &M) { } for (auto &BB : F) { for (auto &I : BB) { - auto remapDebugLoc = [&](DebugLoc DL) -> DebugLoc { + auto remapDebugLoc = [&](const DebugLoc &DL) -> DebugLoc { auto *Scope = DL.getScope(); MDNode *InlinedAt = DL.getInlinedAt(); Scope = remap(Scope);