aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-17 23:32:47 +0000
committerChris Lattner <sabre@nondot.org>2002-08-17 23:32:47 +0000
commit9da0715aa4ec1cc9181b786c100fa3dfabe9a404 (patch)
treeb56d4a48abe629fb97878e548317156cc43d26e0 /lib/VMCore/Module.cpp
parent58dda9a8f2ad7056cddc389a1d730b732b7ab6f1 (diff)
downloadexternal_llvm-9da0715aa4ec1cc9181b786c100fa3dfabe9a404.zip
external_llvm-9da0715aa4ec1cc9181b786c100fa3dfabe9a404.tar.gz
external_llvm-9da0715aa4ec1cc9181b786c100fa3dfabe9a404.tar.bz2
Add Module::dump() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r--lib/VMCore/Module.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 836ed47..990774a 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -61,6 +61,11 @@ Module::~Module() {
delete SymTab;
}
+// Module::dump() - Allow printing from debugger
+void Module::dump() const {
+ print(std::cerr);
+}
+
SymbolTable *Module::getSymbolTableSure() {
if (!SymTab) SymTab = new SymbolTable(0);
return SymTab;
@@ -147,13 +152,12 @@ std::string Module::getTypeName(const Type *Ty) {
}
-// 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.
+// dropAllReferences() - This function causes all the subelementss to "let go"
+// of all references that they are maintaining. This allows one to 'delete' a
+// whole module 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 Module::dropAllReferences() {
for(Module::iterator I = begin(), E = end(); I != E; ++I)