Undo previous patch. It is not that simple to fix dom info here.
[oota-llvm.git] / lib / Transforms / Scalar / Reg2Mem.cpp
index b31b1d1fa6ea8b194d7be23ac1943af1a0c9e987..ce38b08ef97fa02cd0723a6f834ec40715affc99 100644 (file)
@@ -67,7 +67,7 @@ namespace {
         while (isa<AllocaInst>(I)) ++I;
 
         CastInst *AllocaInsertionPoint =
-          CastInst::create(Instruction::BitCast,
+          CastInst::Create(Instruction::BitCast,
                            Constant::getNullValue(Type::Int32Ty), Type::Int32Ty,
                            "reg2mem alloca point", I);
 
@@ -119,7 +119,7 @@ X("reg2mem", "Demote all values to stack slots");
 
 // createDemoteRegisterToMemory - Provide an entry point to create this pass.
 //
-const PassInfo *llvm::DemoteRegisterToMemoryID = X.getPassInfo();
+const PassInfo *const llvm::DemoteRegisterToMemoryID = &X;
 FunctionPass *llvm::createDemoteRegisterToMemoryPass() {
   return new RegToMem();
 }