Don't use PassInfo* as a type identifier for passes. Instead, use the address of...
[oota-llvm.git] / lib / Transforms / Utils / SSI.cpp
index d54a0e5a751e4fdf0e8833a8a224adc24991a2b0..81523d3bdc8a85643461c3872959a0f918ae1e50 100644 (file)
@@ -80,12 +80,12 @@ void SSI::insertSigmaFunctions(SmallPtrSet<Instruction*, 4> &value) {
     for (Value::use_iterator begin = (*I)->use_begin(),
          end = (*I)->use_end(); begin != end; ++begin) {
       // Test if the Use of the Value is in a comparator
-      if (CmpInst *CI = dyn_cast<CmpInst>(begin)) {
+      if (CmpInst *CI = dyn_cast<CmpInst>(*begin)) {
         // Iterates through all uses of CmpInst
         for (Value::use_iterator begin_ci = CI->use_begin(),
              end_ci = CI->use_end(); begin_ci != end_ci; ++begin_ci) {
           // Test if any use of CmpInst is in a Terminator
-          if (TerminatorInst *TI = dyn_cast<TerminatorInst>(begin_ci)) {
+          if (TerminatorInst *TI = dyn_cast<TerminatorInst>(*begin_ci)) {
             insertSigma(TI, *I);
           }
         }
@@ -399,7 +399,7 @@ INITIALIZE_PASS(SSI, "ssi",
 namespace {
   struct SSIEverything : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    SSIEverything() : FunctionPass(&ID) {}
+    SSIEverything() : FunctionPass(ID) {}
 
     bool runOnFunction(Function &F);