Skip to content

Commit ca134e4

Browse files
committed
[NFC] fix diagnostic
It's pretty silly to diagnose on a scalar copy but the build does that: loop variable 'SibReg' of type 'const llvm::Register' creates a copy from type 'const llvm::Register' [-Wrange-loop-analysis]
1 parent 73e575a commit ca134e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/InlineSpiller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ bool HoistSpillHelper::isSpillCandBB(LiveInterval &OrigLI, VNInfo &OrigVNI,
11971197
SmallSetVector<Register, 16> &Siblings = Virt2SiblingsMap[OrigReg];
11981198
assert(OrigLI.getVNInfoAt(Idx) == &OrigVNI && "Unexpected VNI");
11991199

1200-
for (auto const SibReg : Siblings) {
1200+
for (const Register &SibReg : Siblings) {
12011201
LiveInterval &LI = LIS.getInterval(SibReg);
12021202
VNInfo *VNI = LI.getVNInfoAt(Idx);
12031203
if (VNI) {

0 commit comments

Comments
 (0)