OSDN Git Service

[PGO] Fix the buildbot failure in r362995
authorRong Xu <xur@google.com>
Mon, 10 Jun 2019 23:20:04 +0000 (23:20 +0000)
committerRong Xu <xur@google.com>
Mon, 10 Jun 2019 23:20:04 +0000 (23:20 +0000)
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

index 1bf80d6..6fec3c9 100644 (file)
@@ -798,14 +798,11 @@ BasicBlock *FuncPGOInstrumentation<Edge, BBInfo>::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;
   };