[llvm-commits] [llvm] r54977 - in /llvm/trunk/lib/Analysis: AliasAnalysisCounter.cpp IPA/FindUsedTypes.cpp
Chris Lattner
sabre at nondot.org
Mon Aug 18 21:42:37 PDT 2008
Author: lattner
Date: Mon Aug 18 23:42:37 2008
New Revision: 54977
URL: http://llvm.org/viewvc/llvm-project?rev=54977&view=rev
Log:
Don't use the result of WriteAsOperand or WriteTypeSymbolic.
Modified:
llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp
llvm/trunk/lib/Analysis/IPA/FindUsedTypes.cpp
Modified: llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp?rev=54977&r1=54976&r2=54977&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp Mon Aug 18 23:42:37 2008
@@ -140,9 +140,11 @@
if (PrintAll || (PrintAllFailures && R == MayAlias)) {
cerr << AliasString << ":\t";
cerr << "[" << V1Size << "B] ";
- WriteAsOperand(*cerr.stream(), V1, true, M) << ", ";
+ WriteAsOperand(*cerr.stream(), V1, true, M);
+ cerr << ", ";
cerr << "[" << V2Size << "B] ";
- WriteAsOperand(*cerr.stream(), V2, true, M) << "\n";
+ WriteAsOperand(*cerr.stream(), V2, true, M);
+ cerr << "\n";
}
return R;
Modified: llvm/trunk/lib/Analysis/IPA/FindUsedTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/FindUsedTypes.cpp?rev=54977&r1=54976&r2=54977&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/FindUsedTypes.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/FindUsedTypes.cpp Mon Aug 18 23:42:37 2008
@@ -59,7 +59,8 @@
UsedTypes.clear(); // reset if run multiple times...
// Loop over global variables, incorporating their types
- for (Module::const_global_iterator I = m.global_begin(), E = m.global_end(); I != E; ++I) {
+ for (Module::const_global_iterator I = m.global_begin(), E = m.global_end();
+ I != E; ++I) {
IncorporateType(I->getType());
if (I->hasInitializer())
IncorporateValue(I->getInitializer());
@@ -93,6 +94,8 @@
void FindUsedTypes::print(std::ostream &o, const Module *M) const {
o << "Types in use by this module:\n";
for (std::set<const Type *>::const_iterator I = UsedTypes.begin(),
- E = UsedTypes.end(); I != E; ++I)
- WriteTypeSymbolic(o << " ", *I, M) << "\n";
+ E = UsedTypes.end(); I != E; ++I) {
+ WriteTypeSymbolic(o << " ", *I, M);
+ o << "\n";
+ }
}
More information about the llvm-commits
mailing list