Author: criswell Date: Mon Dec 17 14:50:01 2007 New Revision: 45117 URL: http://llvm.org/viewvc/llvm-project?rev=45117&view=rev Log: Add ID values to the pool allocation passes. Modify constructors accordingly.
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=45117&r1=45116&r2=45117&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original) +++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Mon Dec 17 14:50:01 2007 @@ -148,11 +148,11 @@ public: static char ID; #ifdef SAFECODE - PoolAllocate(bool passAllArguments = true) - : ModulePass((intptr_t)&ID), PassAllArguments(passAllArguments) {} + PoolAllocate(bool passAllArguments = true, intptr_t IDp = (intptr_t) (&ID)) + : ModulePass((intptr_t)IDp), PassAllArguments(passAllArguments) {} #else - PoolAllocate(bool passAllArguments = false) - : ModulePass((intptr_t)&ID), PassAllArguments(passAllArguments) {} + PoolAllocate(bool passAllArguments = false, intptr_t IDp = (intptr_t) (&ID)) + : ModulePass((intptr_t)IDp), PassAllArguments(passAllArguments) {} #endif bool runOnModule(Module &M); @@ -283,7 +283,8 @@ /// pass, which requires a pool descriptor to be available for a pool if any /// load or store to that pool is performed. struct PoolAllocatePassAllPools : public PoolAllocate { - PoolAllocatePassAllPools() : PoolAllocate(true) {} + static char ID; + PoolAllocatePassAllPools() : PoolAllocate(true, (intptr_t) &ID) {} }; } Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=45117&r1=45116&r2=45117&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Mon Dec 17 14:50:01 2007 @@ -43,6 +43,9 @@ using namespace CUA; #endif +char PoolAllocate::ID = 0; +char PoolAllocatePassAllPools::ID = 0; + const Type *PoolAllocate::PoolDescPtrTy = 0; #if 0 _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits