From 724604901a104d8ba9e48ca0330e164a66c1c7ac Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 7 May 2021 11:42:16 -0700 Subject: [PATCH] [unittest] Fix -Wunused-variable after D94717 --- llvm/unittests/Analysis/LoopInfoTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/unittests/Analysis/LoopInfoTest.cpp b/llvm/unittests/Analysis/LoopInfoTest.cpp index db6484f..550458c 100644 --- a/llvm/unittests/Analysis/LoopInfoTest.cpp +++ b/llvm/unittests/Analysis/LoopInfoTest.cpp @@ -1534,8 +1534,7 @@ TEST(LoopInfoTest, LoopUserBranch) { runWithLoopInfo(*M, "foo", [&](Function &F, LoopInfo &LI) { Function::iterator FI = F.begin(); FI = ++FI; - BasicBlock *Guard = &*FI; - assert(Guard->getName() == "guard"); + assert(FI->getName() == "guard"); FI = ++FI; BasicBlock *Header = &*(++FI); -- 2.7.4