diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-06 20:29:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-06 20:29:01 +0000 |
commit | 009505452b713ed2e3a8e99c5545a6e721c65495 (patch) | |
tree | 136a71c5b87bdf534d1f20a67558b49226b5a4d6 /include/llvm/Module.h | |
parent | 8d0afd3d32d1d67f9aa5df250a1d6955aa8f1ac9 (diff) | |
download | external_llvm-009505452b713ed2e3a8e99c5545a6e721c65495.zip external_llvm-009505452b713ed2e3a8e99c5545a6e721c65495.tar.gz external_llvm-009505452b713ed2e3a8e99c5545a6e721c65495.tar.bz2 |
Initial revision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h new file mode 100644 index 0000000..9437b2c --- /dev/null +++ b/include/llvm/Module.h @@ -0,0 +1,38 @@ +//===-- llvm/Module.h - C++ class to represent a VM module -------*- C++ -*--=// +// +// This file contains the declarations for the Module class that is used to +// maintain all the information related to a VM module. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_MODULE_H +#define LLVM_MODULE_H + +#include "llvm/SymTabValue.h" +class Method; + +class Module : public SymTabValue { +public: + typedef ValueHolder<Method, Module> MethodListType; +private: + MethodListType MethodList; // The Methods + +public: + Module(); + ~Module(); + + inline const MethodListType &getMethodList() const { return MethodList; } + inline MethodListType &getMethodList() { return MethodList; } + + // dropAllReferences() - This function causes all the subinstructions to "let + // go" of all references that they are maintaining. This allows one to + // 'delete' a whole class at a time, even though there may be circular + // references... first all references are dropped, and all use counts go to + // zero. Then everything is delete'd for real. Note that no operations are + // valid on an object that has "dropped all references", except operator + // delete. + // + void dropAllReferences(); +}; + +#endif |