From e3818dcc4e9e72c9fe8964ed863c7aa99587b58f Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 30 Jan 2008 07:54:16 +0000 Subject: [PATCH] Use empty() instead of comparing size() with zero. llvm-svn: 46554 --- lib/Transforms/Scalar/DeadStoreElimination.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index ba0d1bdf2bd..2e6db3addfa 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -420,7 +420,7 @@ bool DSE::handleEndBlock(BasicBlock& BB, } else { // For any non-memory-affecting non-terminators, DCE them as we reach them Instruction *CI = BBI; - if (!CI->isTerminator() && CI->getNumUses() == 0 && !isa(CI)) { + if (!CI->isTerminator() && CI->use_empty() && !isa(CI)) { // DCE instructions only used to calculate that load for (Instruction::op_iterator OI = CI->op_begin(), OE = CI->op_end();