[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp CallGraph.cpp
Bill Wendling
isanbard at gmail.com
Wed Dec 6 17:32:03 PST 2006
Changes in directory llvm/lib/Analysis/IPA:
Andersens.cpp updated: 1.39 -> 1.40
CallGraph.cpp updated: 1.61 -> 1.62
---
Log message:
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.
---
Diffs of the changes: (+28 -28)
Andersens.cpp | 48 ++++++++++++++++++++++++------------------------
CallGraph.cpp | 8 ++++----
2 files changed, 28 insertions(+), 28 deletions(-)
Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.39 llvm/lib/Analysis/IPA/Andersens.cpp:1.40
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.39 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/IPA/Andersens.cpp Wed Dec 6 19:30:31 2006
@@ -533,7 +533,7 @@
case Instruction::BitCast:
return getNodeForConstantPointer(CE->getOperand(0));
default:
- llvm_cerr << "Constant Expr not yet handled: " << *CE << "\n";
+ cerr << "Constant Expr not yet handled: " << *CE << "\n";
assert(0);
}
} else {
@@ -560,7 +560,7 @@
case Instruction::BitCast:
return getNodeForConstantPointerTarget(CE->getOperand(0));
default:
- llvm_cerr << "Constant Expr not yet handled: " << *CE << "\n";
+ cerr << "Constant Expr not yet handled: " << *CE << "\n";
assert(0);
}
} else {
@@ -786,7 +786,7 @@
return;
default:
// Is this something we aren't handling yet?
- llvm_cerr << "Unknown instruction: " << I;
+ cerr << "Unknown instruction: " << I;
abort();
}
}
@@ -1104,13 +1104,13 @@
void Andersens::PrintNode(Node *N) {
if (N == &GraphNodes[UniversalSet]) {
- llvm_cerr << "<universal>";
+ cerr << "<universal>";
return;
} else if (N == &GraphNodes[NullPtr]) {
- llvm_cerr << "<nullptr>";
+ cerr << "<nullptr>";
return;
} else if (N == &GraphNodes[NullObject]) {
- llvm_cerr << "<null>";
+ cerr << "<null>";
return;
}
@@ -1119,56 +1119,56 @@
if (Function *F = dyn_cast<Function>(V)) {
if (isa<PointerType>(F->getFunctionType()->getReturnType()) &&
N == getReturnNode(F)) {
- llvm_cerr << F->getName() << ":retval";
+ cerr << F->getName() << ":retval";
return;
} else if (F->getFunctionType()->isVarArg() && N == getVarargNode(F)) {
- llvm_cerr << F->getName() << ":vararg";
+ cerr << F->getName() << ":vararg";
return;
}
}
if (Instruction *I = dyn_cast<Instruction>(V))
- llvm_cerr << I->getParent()->getParent()->getName() << ":";
+ cerr << I->getParent()->getParent()->getName() << ":";
else if (Argument *Arg = dyn_cast<Argument>(V))
- llvm_cerr << Arg->getParent()->getName() << ":";
+ cerr << Arg->getParent()->getName() << ":";
if (V->hasName())
- llvm_cerr << V->getName();
+ cerr << V->getName();
else
- llvm_cerr << "(unnamed)";
+ cerr << "(unnamed)";
if (isa<GlobalValue>(V) || isa<AllocationInst>(V))
if (N == getObject(V))
- llvm_cerr << "<mem>";
+ cerr << "<mem>";
}
void Andersens::PrintConstraints() {
- llvm_cerr << "Constraints:\n";
+ cerr << "Constraints:\n";
for (unsigned i = 0, e = Constraints.size(); i != e; ++i) {
- llvm_cerr << " #" << i << ": ";
+ cerr << " #" << i << ": ";
Constraint &C = Constraints[i];
if (C.Type == Constraint::Store)
- llvm_cerr << "*";
+ cerr << "*";
PrintNode(C.Dest);
- llvm_cerr << " = ";
+ cerr << " = ";
if (C.Type == Constraint::Load)
- llvm_cerr << "*";
+ cerr << "*";
PrintNode(C.Src);
- llvm_cerr << "\n";
+ cerr << "\n";
}
}
void Andersens::PrintPointsToGraph() {
- llvm_cerr << "Points-to graph:\n";
+ cerr << "Points-to graph:\n";
for (unsigned i = 0, e = GraphNodes.size(); i != e; ++i) {
Node *N = &GraphNodes[i];
- llvm_cerr << "[" << (N->end() - N->begin()) << "] ";
+ cerr << "[" << (N->end() - N->begin()) << "] ";
PrintNode(N);
- llvm_cerr << "\t--> ";
+ cerr << "\t--> ";
for (Node::iterator I = N->begin(), E = N->end(); I != E; ++I) {
- if (I != N->begin()) llvm_cerr << ", ";
+ if (I != N->begin()) cerr << ", ";
PrintNode(*I);
}
- llvm_cerr << "\n";
+ cerr << "\n";
}
}
Index: llvm/lib/Analysis/IPA/CallGraph.cpp
diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.61 llvm/lib/Analysis/IPA/CallGraph.cpp:1.62
--- llvm/lib/Analysis/IPA/CallGraph.cpp:1.61 Tue Dec 5 13:46:12 2006
+++ llvm/lib/Analysis/IPA/CallGraph.cpp Wed Dec 6 19:30:31 2006
@@ -74,7 +74,7 @@
AU.setPreservesAll();
}
- void print(llvm_ostream &o, const Module *M) const {
+ void print(OStream &o, const Module *M) const {
if (o.stream()) print(*o.stream(), M);
}
@@ -95,7 +95,7 @@
/// dump - Print out this call graph.
///
inline void dump() const {
- print(llvm_cerr, Mod);
+ print(cerr, Mod);
}
CallGraphNode* getExternalCallingNode() const { return ExternalCallingNode; }
@@ -212,7 +212,7 @@
}
void CallGraph::dump() const {
- print(llvm_cerr, 0);
+ print(cerr, 0);
}
//===----------------------------------------------------------------------===//
@@ -275,7 +275,7 @@
OS << "\n";
}
-void CallGraphNode::dump() const { print(llvm_cerr); }
+void CallGraphNode::dump() const { print(cerr); }
void CallGraphNode::removeCallEdgeTo(CallGraphNode *Callee) {
for (unsigned i = CalledFunctions.size(); ; --i) {
More information about the llvm-commits
mailing list