From db36f5db1726a387ac7bbb972b246f84fe2102b4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 6 May 2009 17:22:41 +0000 Subject: Simplify code by using SmallVector's pop_back_val() instead of separate back() and pop_back() calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71089 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/Local.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Transforms/Utils/Local.cpp') diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 4f2bb1e3de..94483b816e 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -188,8 +188,7 @@ void llvm::RecursivelyDeleteTriviallyDeadInstructions(Value *V) { DeadInsts.push_back(I); while (!DeadInsts.empty()) { - I = DeadInsts.back(); - DeadInsts.pop_back(); + I = DeadInsts.pop_back_val(); // Null out all of the instruction's operands to see if any operand becomes // dead as we go. -- cgit v1.2.3