================
@@ -28,24 +28,46 @@
 #include "llvm/Support/TimeProfiler.h"
 #include <memory>
 
+#undef DEBUG_TYPE
+#define DEBUG_TYPE "lifetime-safety"
+
 namespace clang::lifetimes {
 namespace internal {
 
 LifetimeSafetyAnalysis::LifetimeSafetyAnalysis(AnalysisDeclContext &AC,
-                                               LifetimeSafetyReporter 
*Reporter)
-    : AC(AC), Reporter(Reporter) {}
+                                               LifetimeSafetyReporter 
*Reporter,
+                                               uint32_t CfgBlocknumThreshold)
+    : CfgBlocknumThreshold(CfgBlocknumThreshold), AC(AC), Reporter(Reporter) {
+  FactMgr.setBlockNumThreshold(CfgBlocknumThreshold);
+}
+
+bool LifetimeSafetyAnalysis::shouldBailOutCFGPreFactGeneration(const CFG& Cfg) 
const {
+  if ((CfgBlocknumThreshold > 0) &&
+      (Cfg.getNumBlockIDs() > CfgBlocknumThreshold)) {
+    LLVM_DEBUG(llvm::dbgs()
----------------
usx95 wrote:

`DEBUG_WITH_TYPE("LifetimeSafety", llvm::dbgs() << ...`

https://github.com/llvm/llvm-project/pull/170444
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to