X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTransforms%2FUtils%2FMem2Reg.cpp;h=13dda65a6b088e3158fa4f9de8cb17ebe32cd2e7;hp=99203b662120eaa697ee6a243d2b76122d810010;hb=9ccaf53ada99c63737547c0235baeb8454b04e80;hpb=7365c091f92db5e68c98d7faedc6c34e1bbbc898 diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 99203b66212..13dda65a6b0 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -27,7 +27,7 @@ STATISTIC(NumPromoted, "Number of alloca's promoted"); namespace { struct PromotePass : public FunctionPass { static char ID; // Pass identification, replacement for typeid - PromotePass() : FunctionPass(&ID) {} + PromotePass() : FunctionPass(ID) {} // runOnFunction - To run this pass, first we calculate the alloca // instructions that are safe for promotion, then we promote each one. @@ -82,7 +82,7 @@ bool PromotePass::runOnFunction(Function &F) { } // Publically exposed interface to pass... -const PassInfo *const llvm::PromoteMemoryToRegisterID = &X; +char &llvm::PromoteMemoryToRegisterID = PromotePass::ID; // createPromoteMemoryToRegister - Provide an entry point to create this pass. // FunctionPass *llvm::createPromoteMemoryToRegisterPass() {