[llvm-commits] [poolalloc] r133099 - /poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Wed Jun 15 15:36:29 PDT 2011


Author: aggarwa4
Date: Wed Jun 15 17:36:29 2011
New Revision: 133099

URL: http://llvm.org/viewvc/llvm-project?rev=133099&view=rev
Log:
Minor clean up. Return correct value from runOnModule

Modified:
    poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp

Modified: poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp?rev=133099&r1=133098&r2=133099&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp Wed Jun 15 17:36:29 2011
@@ -24,7 +24,6 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/Statistic.h"
 
-#include <set>
 #include <vector>
 
 using namespace llvm;
@@ -53,7 +52,6 @@
 static Constant *MallocFunc;
 
 bool TypeChecksOpt::runOnModule(Module &M) {
-  bool modified = false; // Flags whether we modified the module.
   TS = &getAnalysis<dsa::TypeSafety<TDDataStructures> >();
 
   // Create the necessary prototypes
@@ -136,7 +134,6 @@
     
     if(TS->isTypeSafe(CI->getOperand(1)->stripPointerCasts(), CI->getParent()->getParent())) {
       toDelete.push_back(CI);
-      continue;
     }
   }
 
@@ -207,7 +204,7 @@
     I->eraseFromParent();
   }
 
-  return modified;
+  return (numSafe > 0);
 }
 
 





More information about the llvm-commits mailing list