Don't use PassInfo* as a type identifier for passes. Instead, use the address of...
[oota-llvm.git] / tools / bugpoint / ExtractFunction.cpp
index 6913fd06a938ee2122734d5d96c0a6e0d22fa81a..bbdc728890db566e84d0d10d2747fbfe9bc9537b 100644 (file)
@@ -100,7 +100,8 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I,
 }
 
 static const PassInfo *getPI(Pass *P) {
-  const PassInfo *PI = P->getPassInfo();
+  const void *ID = P->getPassID();
+  const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(ID);
   delete P;
   return PI;
 }