diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /include/clang/Checker/PathSensitive/GRWorkList.h | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'include/clang/Checker/PathSensitive/GRWorkList.h')
-rw-r--r-- | include/clang/Checker/PathSensitive/GRWorkList.h | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/include/clang/Checker/PathSensitive/GRWorkList.h b/include/clang/Checker/PathSensitive/GRWorkList.h deleted file mode 100644 index 315b614..0000000 --- a/include/clang/Checker/PathSensitive/GRWorkList.h +++ /dev/null @@ -1,79 +0,0 @@ -//==- GRWorkList.h - Worklist class used by 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 GRWorkList, a pure virtual class that represents an opaque -// worklist used by GRCoreEngine to explore the reachability state space. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_ANALYSIS_GRWORKLIST -#define LLVM_CLANG_ANALYSIS_GRWORKLIST - -#include "clang/Checker/PathSensitive/GRBlockCounter.h" -#include <cstddef> - -namespace clang { - -class CFGBlock; -class ExplodedNode; -class ExplodedNodeImpl; - -class GRWorkListUnit { - ExplodedNode* Node; - GRBlockCounter Counter; - const CFGBlock* Block; - unsigned BlockIdx; // This is the index of the next statement. - -public: - GRWorkListUnit(ExplodedNode* N, GRBlockCounter C, - const CFGBlock* B, unsigned idx) - : Node(N), - Counter(C), - Block(B), - BlockIdx(idx) {} - - explicit GRWorkListUnit(ExplodedNode* N, GRBlockCounter C) - : Node(N), - Counter(C), - Block(NULL), - BlockIdx(0) {} - - ExplodedNode* getNode() const { return Node; } - GRBlockCounter getBlockCounter() const { return Counter; } - const CFGBlock* getBlock() const { return Block; } - unsigned getIndex() const { return BlockIdx; } -}; - -class GRWorkList { - GRBlockCounter CurrentCounter; -public: - virtual ~GRWorkList(); - virtual bool hasWork() const = 0; - - virtual void Enqueue(const GRWorkListUnit& U) = 0; - - void Enqueue(ExplodedNode* N, const CFGBlock* B, unsigned idx) { - Enqueue(GRWorkListUnit(N, CurrentCounter, B, idx)); - } - - void Enqueue(ExplodedNode* N) { - Enqueue(GRWorkListUnit(N, CurrentCounter)); - } - - virtual GRWorkListUnit Dequeue() = 0; - - void setBlockCounter(GRBlockCounter C) { CurrentCounter = C; } - GRBlockCounter getBlockCounter() const { return CurrentCounter; } - - static GRWorkList *MakeDFS(); - static GRWorkList *MakeBFS(); - static GRWorkList *MakeBFSBlockDFSContents(); -}; -} // end clang namespace -#endif |