mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
996fb28c0f
commit
e53883837d
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user