diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-04 17:05:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-04 17:05:41 +0000 |
commit | ae73dc1448d25b02cabc7c64c86c64371453dda8 (patch) | |
tree | af8e2a48c6bdac1ac118d027226915ef67e8bdac /lib/VMCore | |
parent | 79924eb6f5708a2ae36ba22b674b2d7bea3167e6 (diff) | |
download | llvm-ae73dc1448d25b02cabc7c64c86c64371453dda8.tar.gz llvm-ae73dc1448d25b02cabc7c64c86c64371453dda8.tar.bz2 llvm-ae73dc1448d25b02cabc7c64c86c64371453dda8.tar.xz |
Tidy up several unbeseeming casts from pointer to intptr_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 9 | ||||
-rw-r--r-- | lib/VMCore/Verifier.cpp | 10 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index d7b3cc7e63..42b33ff66b 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -73,7 +73,7 @@ class VISIBILITY_HIDDEN BBPassManager : public PMDataManager, public: static char ID; explicit BBPassManager(int Depth) - : PMDataManager(Depth), FunctionPass((intptr_t)&ID) {} + : PMDataManager(Depth), FunctionPass(&ID) {} /// Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the function, and if so, return true. @@ -129,7 +129,7 @@ class FunctionPassManagerImpl : public Pass, public: static char ID; explicit FunctionPassManagerImpl(int Depth) : - Pass((intptr_t)&ID), PMDataManager(Depth), + Pass(&ID), PMDataManager(Depth), PMTopLevelManager(TLM_Function) { } /// add - Add a pass to the queue of passes to run. This passes ownership of @@ -193,7 +193,7 @@ class MPPassManager : public Pass, public PMDataManager { public: static char ID; explicit MPPassManager(int Depth) : - Pass((intptr_t)&ID), PMDataManager(Depth) { } + Pass(&ID), PMDataManager(Depth) { } // Delete on the fly managers. virtual ~MPPassManager() { @@ -269,8 +269,7 @@ class PassManagerImpl : public Pass, public: static char ID; explicit PassManagerImpl(int Depth) : - Pass((intptr_t)&ID), PMDataManager(Depth), - PMTopLevelManager(TLM_Pass) { } + Pass(&ID), PMDataManager(Depth), PMTopLevelManager(TLM_Pass) { } /// add - Add a pass to the queue of passes to run. This passes ownership of /// the Pass to the PassManager. When the PassManager is destroyed, the pass diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 5ca8e1a23a..aa6963d94a 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -70,7 +70,7 @@ namespace { // Anonymous namespace for class struct VISIBILITY_HIDDEN PreVerifier : public FunctionPass { static char ID; // Pass ID, replacement for typeid - PreVerifier() : FunctionPass((intptr_t)&ID) { } + PreVerifier() : FunctionPass(&ID) { } // Check that the prerequisites for successful DominatorTree construction // are satisfied. @@ -118,20 +118,20 @@ namespace { SmallPtrSet<Instruction*, 16> InstsInThisBlock; Verifier() - : FunctionPass((intptr_t)&ID), + : FunctionPass(&ID), Broken(false), RealPass(true), action(AbortProcessAction), DT(0), msgs( std::ios::app | std::ios::out ) {} explicit Verifier(VerifierFailureAction ctn) - : FunctionPass((intptr_t)&ID), + : FunctionPass(&ID), Broken(false), RealPass(true), action(ctn), DT(0), msgs( std::ios::app | std::ios::out ) {} explicit Verifier(bool AB) - : FunctionPass((intptr_t)&ID), + : FunctionPass(&ID), Broken(false), RealPass(true), action( AB ? AbortProcessAction : PrintMessageAction), DT(0), msgs( std::ios::app | std::ios::out ) {} explicit Verifier(DominatorTree &dt) - : FunctionPass((intptr_t)&ID), + : FunctionPass(&ID), Broken(false), RealPass(false), action(PrintMessageAction), DT(&dt), msgs( std::ios::app | std::ios::out ) {} |