aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-01 20:16:19 +0000
committerChris Lattner <sabre@nondot.org>2008-10-01 20:16:19 +0000
commit795daece23cdc66bc7c16e9a2043dd4a4d0bbfc0 (patch)
treed1956483d69c715b6a157a4731ff6326a31d9674 /lib
parentaeaf245db33fa8bccdd14bb8899ee0585a75a7b1 (diff)
add a new form of Type::dump that takes a module for type names,
patch provided by Tomas Lindquist Olsen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56929 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/AsmWriter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 5d765a4c65..c3186f69a5 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1834,6 +1834,14 @@ void Value::dump() const { print(errs()); errs() << '\n'; errs().flush(); }
// Type::dump - allow easy printing of Types from the debugger.
void Type::dump() const { print(errs()); errs() << '\n'; errs().flush(); }
+// Type::dump - allow easy printing of Types from the debugger.
+// This one uses type names from the given context module
+void Type::dump(const Module *Context) const {
+ WriteTypeSymbolic(errs(), this, Context);
+ errs() << '\n';
+ errs().flush();
+}
+
// Module::dump() - Allow printing of Modules from the debugger.
void Module::dump() const { print(errs(), 0); errs().flush(); }