[llvm-commits] CVS: llvm/lib/Analysis/IPA/FindUsedTypes.cpp
Chris Lattner
sabre at nondot.org
Tue Dec 5 22:35:39 PST 2006
Changes in directory llvm/lib/Analysis/IPA:
FindUsedTypes.cpp updated: 1.37 -> 1.38
---
Log message:
Simplify code
---
Diffs of the changes: (+4 -10)
FindUsedTypes.cpp | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
Index: llvm/lib/Analysis/IPA/FindUsedTypes.cpp
diff -u llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.37 llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.38
--- llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.37 Sun Aug 27 17:30:17 2006
+++ llvm/lib/Analysis/IPA/FindUsedTypes.cpp Wed Dec 6 00:35:25 2006
@@ -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 @@
//
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.
More information about the llvm-commits
mailing list