[llvm-branch-commits] [llvm] 2883cd9 - [CFGPrinter] Use succ_empty (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 28 20:00:14 PST 2020


Author: Kazu Hirata
Date: 2020-12-28T19:55:20-08:00
New Revision: 2883cd98f3c04b6ee804a5c3ad897f7f0acf0bfa

URL: https://github.com/llvm/llvm-project/commit/2883cd98f3c04b6ee804a5c3ad897f7f0acf0bfa
DIFF: https://github.com/llvm/llvm-project/commit/2883cd98f3c04b6ee804a5c3ad897f7f0acf0bfa.diff

LOG: [CFGPrinter] Use succ_empty (NFC)

Added: 
    

Modified: 
    llvm/lib/Analysis/CFGPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp
index 582e61b33f49..d41b0f8d48eb 100644
--- a/llvm/lib/Analysis/CFGPrinter.cpp
+++ b/llvm/lib/Analysis/CFGPrinter.cpp
@@ -272,7 +272,7 @@ FunctionPass *llvm::createCFGOnlyPrinterLegacyPassPass() {
 
 void DOTGraphTraits<DOTFuncInfo *>::computeHiddenNodes(const Function *F) {
   auto evaluateBB = [&](const BasicBlock *Node) {
-    if (succ_begin(Node) == succ_end(Node)) {
+    if (succ_empty(Node)) {
       const Instruction *TI = Node->getTerminator();
       isHiddenBasicBlock[Node] =
           (HideUnreachablePaths && isa<UnreachableInst>(TI)) ||


        


More information about the llvm-branch-commits mailing list