forked from OSchip/llvm-project
parent
1cf93970d3
commit
6b2e9d97d1
|
|
@ -17,7 +17,7 @@
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/Assembly/CachedWriter.h"
|
#include "llvm/Assembly/Writer.h"
|
||||||
#include "llvm/Support/InstIterator.h"
|
#include "llvm/Support/InstIterator.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
|
@ -91,15 +91,9 @@ bool FindUsedTypes::runOnModule(Module &m) {
|
||||||
//
|
//
|
||||||
void FindUsedTypes::print(std::ostream &o, const Module *M) const {
|
void FindUsedTypes::print(std::ostream &o, const Module *M) const {
|
||||||
o << "Types in use by this module:\n";
|
o << "Types in use by this module:\n";
|
||||||
if (M) {
|
for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
|
||||||
CachedWriter CW(M, o);
|
E = UsedTypes.end(); I != E; ++I)
|
||||||
for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
|
WriteTypeSymbolic(o << " ", *I, M) << "\n";
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that this file gets linked in when FindUsedTypes.h is used.
|
// Ensure that this file gets linked in when FindUsedTypes.h is used.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue