mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f92791ace5
commit
1ff1ff70e3
@ -25,12 +25,11 @@
|
||||
|
||||
#include "llvm/Analysis/FindUnsafePointerTypes.h"
|
||||
#include "llvm/Assembly/CachedWriter.h"
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Support/InstIterator.h"
|
||||
#include "Support/CommandLine.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
static RegisterAnalysis<FindUnsafePointerTypes>
|
||||
X("unsafepointertypes", "Find Unsafe Pointer Types");
|
||||
@ -72,7 +71,7 @@ bool FindUnsafePointerTypes::run(Module &Mod) {
|
||||
if (PrintFailures) {
|
||||
CachedWriter CW(F->getParent(), std::cerr);
|
||||
std::cerr << "FindUnsafePointerTypes: Type '";
|
||||
CW << ITy;
|
||||
CW << *ITy;
|
||||
std::cerr << "' marked unsafe in '" << F->getName() << "' by:\n";
|
||||
CW << *I;
|
||||
}
|
||||
@ -101,8 +100,7 @@ void FindUnsafePointerTypes::print(std::ostream &o, const Module *M) const {
|
||||
E = getUnsafeTypes().end(); I != E; ++I, ++Counter) {
|
||||
|
||||
o << " #" << Counter << ". ";
|
||||
CW << (Type*)*I << "\n";
|
||||
CW << **I << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -98,9 +98,9 @@ void FindUsedTypes::print(std::ostream &o, const Module *M) const {
|
||||
CachedWriter CW(M, o);
|
||||
for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
|
||||
E = UsedTypes.end(); I != E; ++I)
|
||||
CW << " " << *I << "\n";
|
||||
CW << " " << **I << "\n";
|
||||
} else
|
||||
for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
|
||||
E = UsedTypes.end(); I != E; ++I)
|
||||
o << " " << *I << "\n";
|
||||
o << " " << **I << "\n";
|
||||
}
|
||||
|
@ -41,14 +41,17 @@ void Interval::print(std::ostream &o) const {
|
||||
<< "Interval Contents:\n";
|
||||
|
||||
// Print out all of the basic blocks in the interval...
|
||||
std::copy(Nodes.begin(), Nodes.end(),
|
||||
std::ostream_iterator<BasicBlock*>(o, "\n"));
|
||||
for (std::vector<BasicBlock*>::const_iterator I = Nodes.begin(),
|
||||
E = Nodes.end(); I != E; ++I)
|
||||
o << **I << "\n";
|
||||
|
||||
o << "Interval Predecessors:\n";
|
||||
std::copy(Predecessors.begin(), Predecessors.end(),
|
||||
std::ostream_iterator<BasicBlock*>(o, "\n"));
|
||||
|
||||
for (std::vector<BasicBlock*>::const_iterator I = Predecessors.begin(),
|
||||
E = Predecessors.end(); I != E; ++I)
|
||||
o << **I << "\n";
|
||||
|
||||
o << "Interval Successors:\n";
|
||||
std::copy(Successors.begin(), Successors.end(),
|
||||
std::ostream_iterator<BasicBlock*>(o, "\n"));
|
||||
for (std::vector<BasicBlock*>::const_iterator I = Successors.begin(),
|
||||
E = Successors.end(); I != E; ++I)
|
||||
o << **I << "\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user