Index: include/llvm/Type.h
===================================================================
--- include/llvm/Type.h	(revision 56311)
+++ include/llvm/Type.h	(working copy)
@@ -26,6 +26,7 @@
 class IntegerType;
 class TypeMapBase;
 class raw_ostream;
+class Module;
 
 /// This file contains the declaration of the Type class.  For more "Type" type
 /// stuff, look in DerivedTypes.h.
@@ -162,6 +163,9 @@
   /// @brief Debugging support: print to stderr
   void dump() const;
 
+  /// @brief Debugging support: print to stderr (use type names from context module)
+  void dump(const Module *Context) const;
+
   //===--------------------------------------------------------------------===//
   // Property accessors for dealing with types... Some of these virtual methods
   // are defined in private classes defined in Type.cpp for primitive types.
Index: lib/VMCore/AsmWriter.cpp
===================================================================
--- lib/VMCore/AsmWriter.cpp	(revision 56311)
+++ lib/VMCore/AsmWriter.cpp	(working copy)
@@ -1845,6 +1845,14 @@
 // 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(); }
 
