aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA/FindUsedTypes.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-06 06:35:25 +0000
committerChris Lattner <sabre@nondot.org>2006-12-06 06:35:25 +0000
commite53883837ddb3f431788c31c7340bd63da8c3ac6 (patch)
treef07a4e657e2c1a153b54e82c418f0e190e86772a /lib/Analysis/IPA/FindUsedTypes.cpp
parent996fb28c0ffa603e180bcd1912d728de801a4908 (diff)
downloadexternal_llvm-e53883837ddb3f431788c31c7340bd63da8c3ac6.zip
external_llvm-e53883837ddb3f431788c31c7340bd63da8c3ac6.tar.gz
external_llvm-e53883837ddb3f431788c31c7340bd63da8c3ac6.tar.bz2
Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/FindUsedTypes.cpp')
-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.