Don't use the result of WriteAsOperand or WriteTypeSymbolic.
authorChris Lattner <sabre@nondot.org>
Tue, 19 Aug 2008 04:42:37 +0000 (04:42 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 19 Aug 2008 04:42:37 +0000 (04:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54977 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/AliasAnalysisCounter.cpp
lib/Analysis/IPA/FindUsedTypes.cpp

index 48f00ad2225fba95340ea717bedb0e828b381715..de40ad8deef2a29896ec4782b238391dc843f166 100644 (file)
@@ -140,9 +140,11 @@ AliasAnalysisCounter::alias(const Value *V1, unsigned V1Size,
   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;
index 0a28cd5153c81c80064ba4a2b6314ea942581dc7..c3b08debe6a50afc0590dc1a87bcc3c13ea3092e 100644 (file)
@@ -59,7 +59,8 @@ bool FindUsedTypes::runOnModule(Module &m) {
   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 @@ bool FindUsedTypes::runOnModule(Module &m) {
 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";
+  }
 }