aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/IPA/FindUsedTypes.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp
index d4ea9f9..1208dd1 100644
--- a/lib/Analysis/IPA/FindUsedTypes.cpp
+++ b/lib/Analysis/IPA/FindUsedTypes.cpp
@@ -17,7 +17,7 @@
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
-#include "llvm/Assembly/CachedWriter.h"
+#include "llvm/Assembly/Writer.h"
#include "llvm/Support/InstIterator.h"
using namespace llvm;
@@ -91,15 +91,9 @@ bool FindUsedTypes::runOnModule(Module &m) {
//
void FindUsedTypes::print(std::ostream &o, const Module *M) const {
o << "Types in use by this module:\n";
- if (M) {
- CachedWriter CW(M, o);
- for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
- E = UsedTypes.end(); I != E; ++I)
- CW << " " << **I << "\n";
- } else
- for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
- E = UsedTypes.end(); I != E; ++I)
- o << " " << **I << "\n";
+ for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
+ E = UsedTypes.end(); I != E; ++I)
+ WriteTypeSymbolic(o << " ", *I, M) << "\n";
}
// Ensure that this file gets linked in when FindUsedTypes.h is used.