[llvm] [nfc] Add doc comment for `canReturn` in Analysis/CFG.h (PR #135862)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 15 14:39:01 PDT 2025


https://github.com/mtrofin created https://github.com/llvm/llvm-project/pull/135862

None

>From 1277dbe41568043f318bacd6cd15d64d26a8762a Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Tue, 15 Apr 2025 14:38:36 -0700
Subject: [PATCH] [nfc] Add doc comment for `canReturn` in Analysis/CFG.h

---
 llvm/include/llvm/Analysis/CFG.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Analysis/CFG.h b/llvm/include/llvm/Analysis/CFG.h
index 8451e88146d7c..052ffb2872af7 100644
--- a/llvm/include/llvm/Analysis/CFG.h
+++ b/llvm/include/llvm/Analysis/CFG.h
@@ -174,7 +174,10 @@ bool containsIrreducibleCFG(RPOTraversalT &RPOTraversal, const LoopInfoT &LI) {
 
   return false;
 }
+
+/// Return true if there is at least a path through which F can return, false if
+/// there is no such path.
 bool canReturn(const Function &F);
-} // End llvm namespace
+} // namespace llvm
 
 #endif



More information about the llvm-commits mailing list