[cfe-commits] r142905 - /cfe/trunk/include/clang/Analysis/Analyses/Dominators.h

Ted Kremenek kremenek at apple.com
Mon Oct 24 20:37:17 PDT 2011


Author: kremenek
Date: Mon Oct 24 22:37:17 2011
New Revision: 142905

URL: http://llvm.org/viewvc/llvm-project?rev=142905&view=rev
Log:
Remove extra copy of contents of header file resulting in a patch being applied twice.  Aren't include guards great?

Modified:
    cfe/trunk/include/clang/Analysis/Analyses/Dominators.h

Modified: cfe/trunk/include/clang/Analysis/Analyses/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/Dominators.h?rev=142905&r1=142904&r2=142905&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/Dominators.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/Dominators.h Mon Oct 24 22:37:17 2011
@@ -1,4 +1,4 @@
-//==- Dominators.cpp - Construct the Dominance Tree Given CFG ----*- C++ --*-==//
+//==- Dominators.h - Construct the Dominance Tree Given CFG -----*- C++ --*-==//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -76,81 +76,4 @@
 } // end namespace clang
 
 #endif
-//==- Dominators.cpp - Construct the Dominance Tree Given CFG ----*- C++ --*-==//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements a simple, fast dominance algorithm for source-level CFGs.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_DOMINATORS_H
-#define LLVM_CLANG_DOMINATORS_H
-
-#include "clang/Analysis/CFG.h"
-#include "clang/Analysis/AnalysisDeclContext.h"
-#include "llvm/ADT/DenseMap.h"
-
-namespace clang {
 
-class CFG;
-class CFGBlock;
-
-class DominatorTree : public ManagedAnalysis {
-  typedef llvm::DenseMap<const CFGBlock *, CFGBlock*> CFGBlockMapTy;
-
-public:
-  DominatorTree(AnalysisDeclContext &ac) 
-      : AC(ac) {};
-
-  virtual ~DominatorTree();
-
-  /// Return the immediate dominator node given a CFGBlock.
-  /// For entry block, the dominator is itself.
-  /// This is the same as using operator[] on this class.
-  CFGBlock *getNode(const CFGBlock *B) const;
-
-  /// This returns the Entry Block for the given CFG
-  CFGBlock *getRootNode() { return RootNode; }
-  const CFGBlock *getRootNode() const { return RootNode; }
-
-  /// Returns true iff A dominates B and A != B.
-  /// Note that this is not a constant time operation.
-  bool properlyDominates(const CFGBlock *A, const CFGBlock *B) const;
-
-  /// Returns true iff A dominates B.
-  bool dominates(const CFGBlock *A, const CFGBlock *B) const;
-
-  /// Find nearest common dominator for blocks A and B.
-  /// Common dominator always exists, ex: entry block.
-  const CFGBlock *findNearestCommonDominator(const CFGBlock *A, 
-                                       const CFGBlock *B) const;
-
-  /// Constructs immediate dominator tree for a given CFG based on the algorithm
-  /// described in this paper:
-  ///
-  ///  A Simple, Fast Dominance Algorithm
-  ///  Keith D. Cooper, Timothy J. Harvey and Ken Kennedy
-  ///  Software-Practice and Expreience, 2001;4:1-10.
-  ///
-  /// This implementation is simple and runs faster in practice than the classis
-  /// Lengauer-Tarjan algorithm. For detailed discussions, refer to the paper. 
-  void BuildDominatorTree();
-
-  /// Dump the immediate dominance tree
-  void dump();
-
-private:
-  AnalysisDeclContext &AC;
-  CFGBlock *RootNode;
-  CFGBlockMapTy IDoms;
-};
-
-} // end namespace clang
-
-#endif





More information about the cfe-commits mailing list