Skip to content

Commit bbd1a15

Browse files
authored
SPIRV: Use use_empty instead of getNumUses == 0 (#136338)
1 parent d434097 commit bbd1a15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ void SPIRVEmitIntrinsics::processGlobalValue(GlobalVariable &GV,
18291829
{GV.getType(), Ty}, {&GV, Const});
18301830
InitInst->setArgOperand(1, Init);
18311831
}
1832-
if (!Init && GV.getNumUses() == 0)
1832+
if (!Init && GV.use_empty())
18331833
B.CreateIntrinsic(Intrinsic::spv_unref_global, GV.getType(), &GV);
18341834
}
18351835

0 commit comments

Comments
 (0)