summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite0f6af9bb233ad62d9d379239cde723d869a6b73 (patch)
treec62bffb70f497f884fbf1b90b5d8f6eafe60a131 /llvm/lib/VMCore/Module.cpp
parentb6a0873bd898dffeb6d7bd3f50be98a6e99099eb (diff)
downloadbcm5719-llvm-e0f6af9bb233ad62d9d379239cde723d869a6b73.tar.gz
bcm5719-llvm-e0f6af9bb233ad62d9d379239cde723d869a6b73.zip
Add Module::dump() method
llvm-svn: 3375
Diffstat (limited to 'llvm/lib/VMCore/Module.cpp')
-rw-r--r--llvm/lib/VMCore/Module.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp
index 836ed47667d..990774ab95e 100644
--- a/llvm/lib/VMCore/Module.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud