From 2581aa9e4122908f4f650f5d02194046bb756a74 Mon Sep 17 00:00:00 2001 From: Rong Xu Date: Mon, 10 Jun 2019 23:20:04 +0000 Subject: [PATCH] [PGO] Fix the buildbot failure in r362995 Fixed one unused variable warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363004 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index 1bf80d63500..6fec3c9c79e 100644 --- a/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -798,14 +798,11 @@ BasicBlock *FuncPGOInstrumentation::getInstrBB(Edge *E) { if (DestBB == nullptr) return SrcBB; - auto canInstrument = [this](BasicBlock *BB) -> BasicBlock * { + auto canInstrument = [](BasicBlock *BB) -> BasicBlock * { // There are basic blocks (such as catchswitch) cannot be instrumented. // If the returned first insertion point is the end of BB, skip this BB. - if (BB->getFirstInsertionPt() == BB->end()) { - LLVM_DEBUG(dbgs() << "Cannot instrument BB index=" << getBBInfo(BB).Index - << "\n"); + if (BB->getFirstInsertionPt() == BB->end()) return nullptr; - } return BB; }; -- 2.11.0