[cfe-commits] r78302 - /cfe/trunk/include/clang/Analysis/PathSensitive/GRSubEngine.h

Zhongxing Xu xuzhongxing at gmail.com
Thu Aug 6 05:49:15 PDT 2009


Author: zhongxingxu
Date: Thu Aug  6 07:49:15 2009
New Revision: 78302

URL: http://llvm.org/viewvc/llvm-project?rev=78302&view=rev
Log:
I forgot adding this header for r78298.

Added:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRSubEngine.h

Added: cfe/trunk/include/clang/Analysis/PathSensitive/GRSubEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRSubEngine.h?rev=78302&view=auto

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRSubEngine.h (added)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRSubEngine.h Thu Aug  6 07:49:15 2009
@@ -0,0 +1,65 @@
+//== GRSubEngine.h - Interface of the subengine of GRCoreEngine ----*- C++ -*-//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the interface of a subengine of the GRCoreEngine. 
+//
+//===----------------------------------------------------------------------===//
+#ifndef LLVM_CLANG_ANALYSIS_GRSUBENGINE_H
+#define LLVM_CLANG_ANALYSIS_GRSUBENGINE_H
+
+namespace clang {
+
+class Stmt;
+class CFGBlock;
+class GRState;
+class GRStateManager;
+class GRBlockCounter;
+class GRStmtNodeBuilder;
+class GRBranchNodeBuilder;
+class GRIndirectGotoNodeBuilder;
+class GRSwitchNodeBuilder;
+class GREndPathNodeBuilder;
+
+class GRSubEngine {
+public:
+  virtual const GRState* getInitialState() = 0;
+
+  virtual GRStateManager& getStateManager() = 0;
+
+  /// ProcessStmt - Called by GRCoreEngine. Used to generate new successor
+  ///  nodes by processing the 'effects' of a block-level statement.  
+  virtual void ProcessStmt(Stmt* S, GRStmtNodeBuilder& builder) = 0; 
+  
+  /// ProcessBlockEntrance - Called by GRCoreEngine when start processing
+  ///  a CFGBlock.  This method returns true if the analysis should continue
+  ///  exploring the given path, and false otherwise.
+  virtual bool ProcessBlockEntrance(CFGBlock* B, const GRState* St,
+                                    GRBlockCounter BC) = 0;
+  
+  /// ProcessBranch - Called by GRCoreEngine.  Used to generate successor
+  ///  nodes by processing the 'effects' of a branch condition.
+  virtual void ProcessBranch(Stmt* Condition, Stmt* Term, 
+                             GRBranchNodeBuilder& builder) = 0;
+  
+  /// ProcessIndirectGoto - Called by GRCoreEngine.  Used to generate successor
+  ///  nodes by processing the 'effects' of a computed goto jump.
+  virtual void ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder) = 0;
+  
+  /// ProcessSwitch - Called by GRCoreEngine.  Used to generate successor
+  ///  nodes by processing the 'effects' of a switch statement.
+  virtual void ProcessSwitch(GRSwitchNodeBuilder& builder) = 0;
+  
+  /// ProcessEndPath - Called by GRCoreEngine.  Used to generate end-of-path
+  ///  nodes when the control reaches the end of a function.
+  virtual void ProcessEndPath(GREndPathNodeBuilder& builder) = 0;
+};
+
+}
+
+#endif





More information about the cfe-commits mailing list