IntervalPartition & IntervalIterator classes have been split out into
[oota-llvm.git] / include / llvm / Module.h
1 //===-- llvm/Module.h - C++ class to represent a VM module -------*- C++ -*--=//
2 //
3 // This file contains the declarations for the Module class that is used to 
4 // maintain all the information related to a VM module.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_MODULE_H
9 #define LLVM_MODULE_H
10
11 #include "llvm/SymTabValue.h"
12 class Method;
13
14 class Module : public SymTabValue {
15 public:
16   typedef ValueHolder<Method, Module> MethodListType;
17 private:
18   MethodListType MethodList;     // The Methods
19
20 public:
21   Module();
22   ~Module();
23
24   inline const MethodListType &getMethodList() const  { return MethodList; }
25   inline       MethodListType &getMethodList()        { return MethodList; }
26
27   // dropAllReferences() - This function causes all the subinstructions to "let
28   // go" of all references that they are maintaining.  This allows one to
29   // 'delete' a whole class at a time, even though there may be circular
30   // references... first all references are dropped, and all use counts go to
31   // zero.  Then everything is delete'd for real.  Note that no operations are
32   // valid on an object that has "dropped all references", except operator 
33   // delete.
34   //
35   void dropAllReferences();
36 };
37
38 #endif