[PATCH] D95997: [llvm-mca] Fix compiler warning
Peng Guo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 20:24:32 PST 2021
pguo created this revision.
Herald added a subscriber: gbedwell.
Herald added a reviewer: andreadb.
pguo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fix clang compiler warning from `-Wrange-loop-analysis`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95997
Files:
llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
Index: llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
===================================================================
--- llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
+++ llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
@@ -93,7 +93,7 @@
MutableArrayRef<InstructionInfoViewData> IIVD) const {
const llvm::MCSubtargetInfo &STI = getSubTargetInfo();
const MCSchedModel &SM = STI.getSchedModel();
- for (const auto &I : zip(getSource(), IIVD)) {
+ for (const auto I : zip(getSource(), IIVD)) {
const MCInst &Inst = std::get<0>(I);
InstructionInfoViewData &IIVDEntry = std::get<1>(I);
const MCInstrDesc &MCDesc = MCII.get(Inst.getOpcode());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95997.321304.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210204/5032af33/attachment.bin>
More information about the llvm-commits
mailing list