Add support for partial redefs to the fast register allocator.
[oota-llvm.git] / tools / bugpoint / ExtractFunction.cpp
index 70011a798b924e92801bf87991e42d8850b85323..eaa2c538d96302793a21afa3d2cfdeacc42842aa 100644 (file)
@@ -73,7 +73,7 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I,
   Instruction *TheInst = RI;              // Got the corresponding instruction!
 
   // If this instruction produces a value, replace any users with null values
-  if (isa<StructType>(TheInst->getType()))
+  if (TheInst->getType()->isStructTy())
     TheInst->replaceAllUsesWith(UndefValue::get(TheInst->getType()));
   else if (TheInst->getType() != Type::getVoidTy(I->getContext()))
     TheInst->replaceAllUsesWith(Constant::getNullValue(TheInst->getType()));