فهرست منبع

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
Dan Gohman 17 سال پیش
والد
کامیت
ae73dc1448
100فایلهای تغییر یافته به همراه125 افزوده شده و 123 حذف شده
  1. 3 3
      include/llvm/Analysis/Dominators.h
  2. 1 1
      include/llvm/Analysis/FindUsedTypes.h
  3. 1 1
      include/llvm/Analysis/IntervalPartition.h
  4. 1 0
      include/llvm/Analysis/LoopPass.h
  5. 1 1
      include/llvm/Analysis/MemoryDependenceAnalysis.h
  6. 2 2
      include/llvm/Analysis/PostDominators.h
  7. 1 1
      include/llvm/Analysis/ScalarEvolution.h
  8. 1 0
      include/llvm/CallGraphSCCPass.h
  9. 1 1
      include/llvm/CodeGen/LiveIntervalAnalysis.h
  10. 1 1
      include/llvm/CodeGen/LiveStackAnalysis.h
  11. 1 1
      include/llvm/CodeGen/LiveVariables.h
  12. 1 0
      include/llvm/CodeGen/MachineFunctionPass.h
  13. 2 2
      include/llvm/Transforms/IPO/InlinerPass.h
  14. 1 1
      include/llvm/Transforms/RSProfiling.h
  15. 1 1
      include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
  16. 1 1
      lib/Analysis/AliasAnalysisCounter.cpp
  17. 1 1
      lib/Analysis/AliasAnalysisEvaluator.cpp
  18. 1 1
      lib/Analysis/AliasDebugger.cpp
  19. 1 1
      lib/Analysis/AliasSetTracker.cpp
  20. 3 3
      lib/Analysis/BasicAliasAnalysis.cpp
  21. 5 5
      lib/Analysis/CFGPrinter.cpp
  22. 1 1
      lib/Analysis/IPA/Andersens.cpp
  23. 1 1
      lib/Analysis/IPA/CallGraph.cpp
  24. 1 1
      lib/Analysis/IPA/CallGraphSCCPass.cpp
  25. 1 1
      lib/Analysis/IPA/GlobalsModRef.cpp
  26. 1 1
      lib/Analysis/InstCount.cpp
  27. 1 1
      lib/Analysis/IntervalPartition.cpp
  28. 1 1
      lib/Analysis/LoopPass.cpp
  29. 1 1
      lib/Analysis/ProfileInfo.cpp
  30. 1 1
      lib/Analysis/ProfileInfoLoaderPass.cpp
  31. 1 1
      lib/Bitcode/Writer/BitcodeWriterPass.cpp
  32. 1 1
      lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  33. 1 1
      lib/CodeGen/BranchFolding.cpp
  34. 1 1
      lib/CodeGen/ELFWriter.cpp
  35. 1 1
      lib/CodeGen/GCMetadata.cpp
  36. 1 1
      lib/CodeGen/GCStrategy.cpp
  37. 1 1
      lib/CodeGen/IfConversion.cpp
  38. 1 1
      lib/CodeGen/LoopAligner.cpp
  39. 1 1
      lib/CodeGen/LowerSubregs.cpp
  40. 1 1
      lib/CodeGen/MachOWriter.cpp
  41. 2 2
      lib/CodeGen/MachineFunction.cpp
  42. 1 1
      lib/CodeGen/MachineLICM.cpp
  43. 2 2
      lib/CodeGen/MachineModuleInfo.cpp
  44. 1 1
      lib/CodeGen/MachineSink.cpp
  45. 1 1
      lib/CodeGen/PHIElimination.cpp
  46. 1 1
      lib/CodeGen/PostRASchedulerList.cpp
  47. 1 1
      lib/CodeGen/PrologEpilogInserter.cpp
  48. 1 1
      lib/CodeGen/RegAllocBigBlock.cpp
  49. 1 1
      lib/CodeGen/RegAllocLinearScan.cpp
  50. 1 2
      lib/CodeGen/RegAllocLocal.cpp
  51. 1 1
      lib/CodeGen/RegAllocSimple.cpp
  52. 1 1
      lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  53. 1 1
      lib/CodeGen/SimpleRegisterCoalescing.h
  54. 1 1
      lib/CodeGen/StackSlotColoring.cpp
  55. 1 1
      lib/CodeGen/StrongPHIElimination.cpp
  56. 1 1
      lib/CodeGen/TwoAddressInstructionPass.cpp
  57. 2 2
      lib/CodeGen/UnreachableBlockElim.cpp
  58. 2 2
      lib/Target/ARM/ARMCodeEmitter.cpp
  59. 1 1
      lib/Target/ARM/ARMConstantIslandPass.cpp
  60. 1 1
      lib/Target/ARM/ARMLoadStoreOptimizer.cpp
  61. 1 1
      lib/Target/Alpha/AlphaBranchSelector.cpp
  62. 2 2
      lib/Target/Alpha/AlphaCodeEmitter.cpp
  63. 1 1
      lib/Target/Alpha/AlphaLLRP.cpp
  64. 2 2
      lib/Target/CBackend/CBackend.cpp
  65. 1 1
      lib/Target/CppBackend/CPPBackend.cpp
  66. 1 1
      lib/Target/IA64/IA64Bundling.cpp
  67. 2 2
      lib/Target/MSIL/MSILWriter.h
  68. 1 1
      lib/Target/Mips/MipsDelaySlotFiller.cpp
  69. 1 1
      lib/Target/PowerPC/PPCBranchSelector.cpp
  70. 1 1
      lib/Target/PowerPC/PPCCodeEmitter.cpp
  71. 1 1
      lib/Target/Sparc/DelaySlotFiller.cpp
  72. 1 1
      lib/Target/Sparc/FPMover.cpp
  73. 1 1
      lib/Target/TargetData.cpp
  74. 2 2
      lib/Target/X86/X86CodeEmitter.cpp
  75. 1 1
      lib/Target/X86/X86FloatingPoint.cpp
  76. 1 1
      lib/Target/X86/X86RegisterInfo.cpp
  77. 2 2
      lib/Transforms/Hello/Hello.cpp
  78. 1 1
      lib/Transforms/IPO/ArgumentPromotion.cpp
  79. 1 1
      lib/Transforms/IPO/ConstantMerge.cpp
  80. 1 1
      lib/Transforms/IPO/DeadArgumentElimination.cpp
  81. 1 1
      lib/Transforms/IPO/DeadTypeElimination.cpp
  82. 1 1
      lib/Transforms/IPO/ExtractGV.cpp
  83. 1 1
      lib/Transforms/IPO/GlobalDCE.cpp
  84. 1 1
      lib/Transforms/IPO/GlobalOpt.cpp
  85. 1 1
      lib/Transforms/IPO/IPConstantPropagation.cpp
  86. 1 1
      lib/Transforms/IPO/IndMemRemoval.cpp
  87. 4 4
      lib/Transforms/IPO/Inliner.cpp
  88. 2 2
      lib/Transforms/IPO/Internalize.cpp
  89. 3 3
      lib/Transforms/IPO/LoopExtractor.cpp
  90. 1 1
      lib/Transforms/IPO/LowerSetJmp.cpp
  91. 1 1
      lib/Transforms/IPO/PartialSpecialization.cpp
  92. 1 1
      lib/Transforms/IPO/PruneEH.cpp
  93. 1 1
      lib/Transforms/IPO/RaiseAllocations.cpp
  94. 1 1
      lib/Transforms/IPO/StripDeadPrototypes.cpp
  95. 1 1
      lib/Transforms/IPO/StripSymbols.cpp
  96. 1 1
      lib/Transforms/IPO/StructRetPromotion.cpp
  97. 1 1
      lib/Transforms/Instrumentation/EdgeProfiling.cpp
  98. 1 1
      lib/Transforms/Instrumentation/RSProfiling.cpp
  99. 1 1
      lib/Transforms/Scalar/ADCE.cpp
  100. 1 1
      lib/Transforms/Scalar/BasicBlockPlacement.cpp

+ 3 - 3
include/llvm/Analysis/Dominators.h

@@ -720,7 +720,7 @@ public:
   static char ID; // Pass ID, replacement for typeid
   DominatorTreeBase<BasicBlock>* DT;
   
-  DominatorTree() : FunctionPass(intptr_t(&ID)) {
+  DominatorTree() : FunctionPass(&ID) {
     DT = new DominatorTreeBase<BasicBlock>(false);
   }
   
@@ -911,7 +911,7 @@ protected:
   const bool IsPostDominators;
   
 public:
-  DominanceFrontierBase(intptr_t ID, bool isPostDom) 
+  DominanceFrontierBase(void *ID, bool isPostDom) 
     : FunctionPass(ID), IsPostDominators(isPostDom) {}
 
   /// getRoots -  Return the root blocks of the current CFG.  This may include
@@ -1030,7 +1030,7 @@ class DominanceFrontier : public DominanceFrontierBase {
 public:
   static char ID; // Pass ID, replacement for typeid
   DominanceFrontier() : 
-    DominanceFrontierBase(intptr_t(&ID), false) {}
+    DominanceFrontierBase(&ID, false) {}
 
   BasicBlock *getRoot() const {
     assert(Roots.size() == 1 && "Should always have entry node!");

+ 1 - 1
include/llvm/Analysis/FindUsedTypes.h

@@ -25,7 +25,7 @@ class FindUsedTypes : public ModulePass {
   std::set<const Type *> UsedTypes;
 public:
   static char ID; // Pass identification, replacement for typeid
-  FindUsedTypes() : ModulePass((intptr_t)&ID) {}
+  FindUsedTypes() : ModulePass(&ID) {}
 
   /// getTypes - After the pass has been run, return the set containing all of
   /// the types used in the module.

+ 1 - 1
include/llvm/Analysis/IntervalPartition.h

@@ -48,7 +48,7 @@ class IntervalPartition : public FunctionPass {
 public:
   static char ID; // Pass identification, replacement for typeid
 
-  IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
+  IntervalPartition() : FunctionPass(&ID), RootInterval(0) {}
 
   // run - Calculate the interval partition for this function
   virtual bool runOnFunction(Function &F);

+ 1 - 0
include/llvm/Analysis/LoopPass.h

@@ -30,6 +30,7 @@ class LoopPass : public Pass {
 
  public:
   explicit LoopPass(intptr_t pid) : Pass(pid) {}
+  explicit LoopPass(void *pid) : Pass(pid) {}
 
   // runOnLoop - This method should be implemented by the subclass to perform
   // whatever action is necessary for the specified Loop.

+ 1 - 1
include/llvm/Analysis/MemoryDependenceAnalysis.h

@@ -66,7 +66,7 @@ class MemoryDependenceAnalysis : public FunctionPass {
     static Instruction* const Dirty;
     
     static char ID; // Class identification, replacement for typeinfo
-    MemoryDependenceAnalysis() : FunctionPass((intptr_t)&ID) {}
+    MemoryDependenceAnalysis() : FunctionPass(&ID) {}
 
     /// Pass Implementation stuff.  This doesn't do any analysis.
     ///

+ 2 - 2
include/llvm/Analysis/PostDominators.h

@@ -25,7 +25,7 @@ struct PostDominatorTree : public FunctionPass {
   static char ID; // Pass identification, replacement for typeid
   DominatorTreeBase<BasicBlock>* DT;
 
-  PostDominatorTree() : FunctionPass((intptr_t)&ID) {
+  PostDominatorTree() : FunctionPass(&ID) {
     DT = new DominatorTreeBase<BasicBlock>(true);
   }
 
@@ -70,7 +70,7 @@ FunctionPass* createPostDomTree();
 struct PostDominanceFrontier : public DominanceFrontierBase {
   static char ID;
   PostDominanceFrontier() 
-    : DominanceFrontierBase((intptr_t) &ID, true) {}
+    : DominanceFrontierBase(&ID, true) {}
 
   virtual bool runOnFunction(Function &) {
     Frontiers.clear();

+ 1 - 1
include/llvm/Analysis/ScalarEvolution.h

@@ -191,7 +191,7 @@ namespace llvm {
     void *Impl;    // ScalarEvolution uses the pimpl pattern
   public:
     static char ID; // Pass identification, replacement for typeid
-    ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {}
+    ScalarEvolution() : FunctionPass(&ID), Impl(0) {}
 
     /// getSCEV - Return a SCEV expression handle for the full generality of the
     /// specified expression.

+ 1 - 0
include/llvm/CallGraphSCCPass.h

@@ -32,6 +32,7 @@ class PMStack;
 struct CallGraphSCCPass : public Pass {
 
   explicit CallGraphSCCPass(intptr_t pid) : Pass(pid) {}
+  explicit CallGraphSCCPass(void *pid) : Pass(pid) {}
 
   /// doInitialization - This method is called before the SCC's of the program
   /// has been processed, allowing the pass to do initialization as necessary.

+ 1 - 1
include/llvm/CodeGen/LiveIntervalAnalysis.h

@@ -94,7 +94,7 @@ namespace llvm {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
+    LiveIntervals() : MachineFunctionPass(&ID) {}
 
     struct InstrSlots {
       enum {

+ 1 - 1
include/llvm/CodeGen/LiveStackAnalysis.h

@@ -35,7 +35,7 @@ namespace llvm {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    LiveStacks() : MachineFunctionPass((intptr_t)&ID) {}
+    LiveStacks() : MachineFunctionPass(&ID) {}
 
     typedef SS2IntervalMap::iterator iterator;
     typedef SS2IntervalMap::const_iterator const_iterator;

+ 1 - 1
include/llvm/CodeGen/LiveVariables.h

@@ -43,7 +43,7 @@ class TargetRegisterInfo;
 class LiveVariables : public MachineFunctionPass {
 public:
   static char ID; // Pass identification, replacement for typeid
-  LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
+  LiveVariables() : MachineFunctionPass(&ID) {}
 
   /// VarInfo - This represents the regions where a virtual register is live in
   /// the program.  We represent this with three different pieces of

+ 1 - 0
include/llvm/CodeGen/MachineFunctionPass.h

@@ -27,6 +27,7 @@ namespace llvm {
 struct MachineFunctionPass : public FunctionPass {
 
   explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+  explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {}
 
 protected:
   /// runOnMachineFunction - This method must be overloaded to perform the

+ 2 - 2
include/llvm/Transforms/IPO/InlinerPass.h

@@ -26,8 +26,8 @@ namespace llvm {
 /// perform the inlining operations that does not depend on the policy.
 ///
 struct Inliner : public CallGraphSCCPass {
-  explicit Inliner(const void *ID);
-  explicit Inliner(const void *ID, int Threshold);
+  explicit Inliner(void *ID);
+  explicit Inliner(void *ID, int Threshold);
 
   /// getAnalysisUsage - For this class, we declare that we require and preserve
   /// the call graph.  If the derived class implements this method, it should

+ 1 - 1
include/llvm/Transforms/RSProfiling.h

@@ -27,7 +27,7 @@ namespace llvm {
   /// multiple profilers can be support simultaniously.
   struct RSProfilers : public ModulePass {
     static char ID; // Pass identification, replacement for typeinfo
-    RSProfilers() : ModulePass((intptr_t)&ID) {}
+    RSProfilers() : ModulePass(&ID) {}
 
     /// isProfiling - This method returns true if the value passed it was 
     /// inserted by the profiler.

+ 1 - 1
include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h

@@ -26,7 +26,7 @@ struct UnifyFunctionExitNodes : public FunctionPass {
   BasicBlock *ReturnBlock, *UnwindBlock, *UnreachableBlock;
 public:
   static char ID; // Pass identification, replacement for typeid
-  UnifyFunctionExitNodes() : FunctionPass((intptr_t)&ID),
+  UnifyFunctionExitNodes() : FunctionPass(&ID),
                              ReturnBlock(0), UnwindBlock(0) {}
 
   // We can preserve non-critical-edgeness when we unify function exit nodes

+ 1 - 1
lib/Analysis/AliasAnalysisCounter.cpp

@@ -35,7 +35,7 @@ namespace {
     Module *M;
   public:
     static char ID; // Class identification, replacement for typeinfo
-    AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
+    AliasAnalysisCounter() : ModulePass(&ID) {
       No = May = Must = 0;
       NoMR = JustRef = JustMod = MR = 0;
     }

+ 1 - 1
lib/Analysis/AliasAnalysisEvaluator.cpp

@@ -52,7 +52,7 @@ namespace {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    AAEval() : FunctionPass((intptr_t)&ID) {}
+    AAEval() : FunctionPass(&ID) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<AliasAnalysis>();

+ 1 - 1
lib/Analysis/AliasDebugger.cpp

@@ -41,7 +41,7 @@ namespace {
     
   public:
     static char ID; // Class identification, replacement for typeinfo
-    AliasDebugger() : ModulePass((intptr_t)&ID) {}
+    AliasDebugger() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);                 // set up super class

+ 1 - 1
lib/Analysis/AliasSetTracker.cpp

@@ -564,7 +564,7 @@ namespace {
     AliasSetTracker *Tracker;
   public:
     static char ID; // Pass identification, replacement for typeid
-    AliasSetPrinter() : FunctionPass((intptr_t)&ID) {}
+    AliasSetPrinter() : FunctionPass(&ID) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();

+ 3 - 3
lib/Analysis/BasicAliasAnalysis.cpp

@@ -208,8 +208,8 @@ namespace {
   ///
   struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
     static char ID; // Class identification, replacement for typeinfo
-    NoAA() : ImmutablePass((intptr_t)&ID) {}
-    explicit NoAA(intptr_t PID) : ImmutablePass(PID) { }
+    NoAA() : ImmutablePass(&ID) {}
+    explicit NoAA(void *PID) : ImmutablePass(PID) { }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<TargetData>();
@@ -269,7 +269,7 @@ namespace {
   /// derives from the NoAA class.
   struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
     static char ID; // Class identification, replacement for typeinfo
-    BasicAliasAnalysis() : NoAA((intptr_t)&ID) { }
+    BasicAliasAnalysis() : NoAA(&ID) {}
     AliasResult alias(const Value *V1, unsigned V1Size,
                       const Value *V2, unsigned V2Size);
 

+ 5 - 5
lib/Analysis/CFGPrinter.cpp

@@ -92,7 +92,7 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
 namespace {
   struct VISIBILITY_HIDDEN CFGViewer : public FunctionPass {
     static char ID; // Pass identifcation, replacement for typeid
-    CFGViewer() : FunctionPass((intptr_t)&ID) {}
+    CFGViewer() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F) {
       F.viewCFG();
@@ -114,7 +114,7 @@ V0("view-cfg", "View CFG of function", false, true);
 namespace {
   struct VISIBILITY_HIDDEN CFGOnlyViewer : public FunctionPass {
     static char ID; // Pass identifcation, replacement for typeid
-    CFGOnlyViewer() : FunctionPass((intptr_t)&ID) {}
+    CFGOnlyViewer() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F) {
       CFGOnly = true;
@@ -139,8 +139,8 @@ V1("view-cfg-only",
 namespace {
   struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    CFGPrinter() : FunctionPass((intptr_t)&ID) {}
-    explicit CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
+    CFGPrinter() : FunctionPass(&ID) {}
+    explicit CFGPrinter(void *pid) : FunctionPass(pid) {}
 
     virtual bool runOnFunction(Function &F) {
       std::string Filename = "cfg." + F.getName() + ".dot";
@@ -170,7 +170,7 @@ P1("print-cfg", "Print CFG of function to 'dot' file", false, true);
 namespace {
   struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
     static char ID; // Pass identification, replacement for typeid
-    CFGOnlyPrinter() : CFGPrinter((intptr_t)&ID) {}
+    CFGOnlyPrinter() : CFGPrinter(&ID) {}
     virtual bool runOnFunction(Function &F) {
       bool OldCFGOnly = CFGOnly;
       CFGOnly = true;

+ 1 - 1
lib/Analysis/IPA/Andersens.cpp

@@ -431,7 +431,7 @@ namespace {
 
   public:
     static char ID;
-    Andersens() : ModulePass((intptr_t)&ID) {}
+    Andersens() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);

+ 1 - 1
lib/Analysis/IPA/CallGraph.cpp

@@ -50,7 +50,7 @@ class VISIBILITY_HIDDEN BasicCallGraph : public CallGraph, public ModulePass {
 
 public:
   static char ID; // Class identification, replacement for typeinfo
-  BasicCallGraph() : ModulePass((intptr_t)&ID), Root(0), 
+  BasicCallGraph() : ModulePass(&ID), Root(0), 
     ExternalCallingNode(0), CallsExternalNode(0) {}
 
   // runOnModule - Compute the call graph for the specified module.

+ 1 - 1
lib/Analysis/IPA/CallGraphSCCPass.cpp

@@ -34,7 +34,7 @@ class CGPassManager : public ModulePass, public PMDataManager {
 public:
   static char ID;
   explicit CGPassManager(int Depth) 
-    : ModulePass((intptr_t)&ID), PMDataManager(Depth) { }
+    : ModulePass(&ID), PMDataManager(Depth) { }
 
   /// run - Execute all of the passes scheduled for execution.  Keep track of
   /// whether any of the passes modifies the module, and if so, return true.

+ 1 - 1
lib/Analysis/IPA/GlobalsModRef.cpp

@@ -88,7 +88,7 @@ namespace {
 
   public:
     static char ID;
-    GlobalsModRef() : ModulePass((intptr_t)&ID) {}
+    GlobalsModRef() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);                 // set up super class

+ 1 - 1
lib/Analysis/InstCount.cpp

@@ -52,7 +52,7 @@ namespace {
     }
   public:
     static char ID; // Pass identification, replacement for typeid
-    InstCount() : FunctionPass((intptr_t)&ID) {}
+    InstCount() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F);
 

+ 1 - 1
lib/Analysis/IntervalPartition.cpp

@@ -91,7 +91,7 @@ bool IntervalPartition::runOnFunction(Function &F) {
 // distinguish it from a copy constructor.  Always pass in false for now.
 //
 IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
-  : FunctionPass((intptr_t) &ID) {
+  : FunctionPass(&ID) {
   assert(IP.getRootInterval() && "Cannot operate on empty IntervalPartitions!");
 
   // Pass false to intervals_begin because we take ownership of it's memory

+ 1 - 1
lib/Analysis/LoopPass.cpp

@@ -25,7 +25,7 @@ char LPPassManager::ID = 0;
 /// LPPassManager manages FPPassManagers and CalLGraphSCCPasses.
 
 LPPassManager::LPPassManager(int Depth) 
-  : FunctionPass((intptr_t)&ID), PMDataManager(Depth) { 
+  : FunctionPass(&ID), PMDataManager(Depth) { 
   skipThisLoop = false;
   redoThisLoop = false;
   LI = NULL;

+ 1 - 1
lib/Analysis/ProfileInfo.cpp

@@ -85,7 +85,7 @@ namespace {
   struct VISIBILITY_HIDDEN NoProfileInfo 
     : public ImmutablePass, public ProfileInfo {
     static char ID; // Class identification, replacement for typeinfo
-    NoProfileInfo() : ImmutablePass((intptr_t)&ID) {}
+    NoProfileInfo() : ImmutablePass(&ID) {}
   };
 }  // End of anonymous namespace
 

+ 1 - 1
lib/Analysis/ProfileInfoLoaderPass.cpp

@@ -34,7 +34,7 @@ namespace {
   public:
     static char ID; // Class identification, replacement for typeinfo
     explicit LoaderPass(const std::string &filename = "")
-      : ModulePass((intptr_t)&ID), Filename(filename) {
+      : ModulePass(&ID), Filename(filename) {
       if (filename.empty()) Filename = ProfileInfoFilename;
     }
 

+ 1 - 1
lib/Bitcode/Writer/BitcodeWriterPass.cpp

@@ -21,7 +21,7 @@ namespace {
   public:
     static char ID; // Pass identifcation, replacement for typeid
     explicit WriteBitcodePass(std::ostream &o)
-      : ModulePass((intptr_t) &ID), Out(o) {}
+      : ModulePass(&ID), Out(o) {}
     
     const char *getPassName() const { return "Bitcode Writer"; }
     

+ 1 - 1
lib/CodeGen/AsmPrinter/AsmPrinter.cpp

@@ -37,7 +37,7 @@ using namespace llvm;
 char AsmPrinter::ID = 0;
 AsmPrinter::AsmPrinter(raw_ostream &o, TargetMachine &tm,
                        const TargetAsmInfo *T)
-  : MachineFunctionPass((intptr_t)&ID), FunctionNumber(0), O(o),
+  : MachineFunctionPass(&ID), FunctionNumber(0), O(o),
     TM(tm), TAI(T), TRI(tm.getRegisterInfo()),
     IsInTextSection(false)
 {}

+ 1 - 1
lib/CodeGen/BranchFolding.cpp

@@ -48,7 +48,7 @@ namespace {
   struct VISIBILITY_HIDDEN BranchFolder : public MachineFunctionPass {
     static char ID;
     explicit BranchFolder(bool defaultEnableTailMerge) : 
-        MachineFunctionPass((intptr_t)&ID) {
+        MachineFunctionPass(&ID) {
           switch (FlagEnableTailMerge) {
           case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break;
           case cl::BOU_TRUE: EnableTailMerge = true; break;

+ 1 - 1
lib/CodeGen/ELFWriter.cpp

@@ -195,7 +195,7 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &F) {
 //===----------------------------------------------------------------------===//
 
 ELFWriter::ELFWriter(raw_ostream &o, TargetMachine &tm) 
-  : MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
+  : MachineFunctionPass(&ID), O(o), TM(tm) {
   e_flags = 0;    // e_flags defaults to 0, no flags.
 
   is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;

+ 1 - 1
lib/CodeGen/GCMetadata.cpp

@@ -66,7 +66,7 @@ GCFunctionInfo::~GCFunctionInfo() {}
 char GCModuleInfo::ID = 0;
 
 GCModuleInfo::GCModuleInfo()
-  : ImmutablePass((intptr_t)&ID) {}
+  : ImmutablePass(&ID) {}
 
 GCModuleInfo::~GCModuleInfo() {
   clear();

+ 1 - 1
lib/CodeGen/GCStrategy.cpp

@@ -127,7 +127,7 @@ FunctionPass *llvm::createGCLoweringPass() {
 char LowerIntrinsics::ID = 0;
 
 LowerIntrinsics::LowerIntrinsics()
-  : FunctionPass((intptr_t)&ID) {}
+  : FunctionPass(&ID) {}
 
 const char *LowerIntrinsics::getPassName() const {
   return "Lower Garbage Collection Instructions";

+ 1 - 1
lib/CodeGen/IfConversion.cpp

@@ -146,7 +146,7 @@ namespace {
     bool MadeChange;
   public:
     static char ID;
-    IfConverter() : MachineFunctionPass((intptr_t)&ID) {}
+    IfConverter() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
     virtual const char *getPassName() const { return "If Converter"; }

+ 1 - 1
lib/CodeGen/LoopAligner.cpp

@@ -26,7 +26,7 @@ namespace {
   class LoopAligner : public MachineFunctionPass {
   public:
     static char ID;
-    LoopAligner() : MachineFunctionPass((intptr_t)&ID) {}
+    LoopAligner() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
     virtual const char *getPassName() const { return "Loop aligner"; }

+ 1 - 1
lib/CodeGen/LowerSubregs.cpp

@@ -24,7 +24,7 @@ namespace {
   struct VISIBILITY_HIDDEN LowerSubregsInstructionPass
    : public MachineFunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    LowerSubregsInstructionPass() : MachineFunctionPass((intptr_t)&ID) {}
+    LowerSubregsInstructionPass() : MachineFunctionPass(&ID) {}
     
     const char *getPassName() const {
       return "Subregister lowering instruction pass";

+ 1 - 1
lib/CodeGen/MachOWriter.cpp

@@ -336,7 +336,7 @@ void MachOCodeEmitter::emitJumpTables(MachineJumpTableInfo *MJTI) {
 
 char MachOWriter::ID = 0;
 MachOWriter::MachOWriter(raw_ostream &o, TargetMachine &tm) 
-  : MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
+  : MachineFunctionPass(&ID), O(o), TM(tm) {
   is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
   isLittleEndian = TM.getTargetData()->isLittleEndian();
 

+ 2 - 2
lib/CodeGen/MachineFunction.cpp

@@ -49,7 +49,7 @@ namespace {
     const std::string Banner;
 
     Printer (std::ostream *os, const std::string &banner) 
-      : MachineFunctionPass((intptr_t)&ID), OS(os), Banner(banner) {}
+      : MachineFunctionPass(&ID), OS(os), Banner(banner) {}
 
     const char *getPassName() const { return "MachineFunction Printer"; }
 
@@ -77,7 +77,7 @@ FunctionPass *llvm::createMachineFunctionPrinterPass(std::ostream *OS,
 namespace {
   struct VISIBILITY_HIDDEN Deleter : public MachineFunctionPass {
     static char ID;
-    Deleter() : MachineFunctionPass((intptr_t)&ID) {}
+    Deleter() : MachineFunctionPass(&ID) {}
 
     const char *getPassName() const { return "Machine Code Deleter"; }
 

+ 1 - 1
lib/CodeGen/MachineLICM.cpp

@@ -45,7 +45,7 @@ namespace {
     MachineLoop *CurLoop;          // The current loop we are working on.
   public:
     static char ID; // Pass identification, replacement for typeid
-    MachineLICM() : MachineFunctionPass((intptr_t)&ID) {}
+    MachineLICM() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
 

+ 2 - 2
lib/CodeGen/MachineModuleInfo.cpp

@@ -1612,7 +1612,7 @@ DebugScope::~DebugScope() {
 //===----------------------------------------------------------------------===//
 
 MachineModuleInfo::MachineModuleInfo()
-: ImmutablePass((intptr_t)&ID)
+: ImmutablePass(&ID)
 , DR()
 , VR()
 , CompileUnits()
@@ -2011,7 +2011,7 @@ namespace llvm {
 
 struct DebugLabelFolder : public MachineFunctionPass {
   static char ID;
-  DebugLabelFolder() : MachineFunctionPass((intptr_t)&ID) {}
+  DebugLabelFolder() : MachineFunctionPass(&ID) {}
 
   virtual bool runOnMachineFunction(MachineFunction &MF);
   virtual const char *getPassName() const { return "Label Folder"; }

+ 1 - 1
lib/CodeGen/MachineSink.cpp

@@ -36,7 +36,7 @@ namespace {
 
   public:
     static char ID; // Pass identification
-    MachineSinking() : MachineFunctionPass((intptr_t)&ID) {}
+    MachineSinking() : MachineFunctionPass(&ID) {}
     
     virtual bool runOnMachineFunction(MachineFunction &MF);
     

+ 1 - 1
lib/CodeGen/PHIElimination.cpp

@@ -38,7 +38,7 @@ namespace {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    PNE() : MachineFunctionPass((intptr_t)&ID) {}
+    PNE() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
     

+ 1 - 1
lib/CodeGen/PostRASchedulerList.cpp

@@ -29,7 +29,7 @@ namespace {
   class VISIBILITY_HIDDEN SchedulePostRATDList : public MachineFunctionPass {
   public:
     static char ID;
-    SchedulePostRATDList() : MachineFunctionPass((intptr_t)&ID) {}
+    SchedulePostRATDList() : MachineFunctionPass(&ID) {}
   private:
     MachineFunction *MF;
     const TargetMachine *TM;

+ 1 - 1
lib/CodeGen/PrologEpilogInserter.cpp

@@ -35,7 +35,7 @@ using namespace llvm;
 namespace {
   struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass {
     static char ID;
-    PEI() : MachineFunctionPass((intptr_t)&ID) {}
+    PEI() : MachineFunctionPass(&ID) {}
 
     const char *getPassName() const {
       return "Prolog/Epilog Insertion & Frame Finalization";

+ 1 - 1
lib/CodeGen/RegAllocBigBlock.cpp

@@ -82,7 +82,7 @@ namespace {
   class VISIBILITY_HIDDEN RABigBlock : public MachineFunctionPass {
   public:
     static char ID;
-    RABigBlock() : MachineFunctionPass((intptr_t)&ID) {}
+    RABigBlock() : MachineFunctionPass(&ID) {}
   private:
     /// TM - For getting at TargetMachine info 
     ///

+ 1 - 1
lib/CodeGen/RegAllocLinearScan.cpp

@@ -55,7 +55,7 @@ linearscanRegAlloc("linearscan", "  linear scan register allocator",
 namespace {
   struct VISIBILITY_HIDDEN RALinScan : public MachineFunctionPass {
     static char ID;
-    RALinScan() : MachineFunctionPass((intptr_t)&ID) {}
+    RALinScan() : MachineFunctionPass(&ID) {}
 
     typedef std::pair<LiveInterval*, LiveInterval::iterator> IntervalPtr;
     typedef SmallVector<IntervalPtr, 32> IntervalPtrs;

+ 1 - 2
lib/CodeGen/RegAllocLocal.cpp

@@ -44,8 +44,7 @@ namespace {
   class VISIBILITY_HIDDEN RALocal : public MachineFunctionPass {
   public:
     static char ID;
-    RALocal() : MachineFunctionPass((intptr_t)&ID),
-      StackSlotForVirtReg(-1) {}
+    RALocal() : MachineFunctionPass(&ID), StackSlotForVirtReg(-1) {}
   private:
     const TargetMachine *TM;
     MachineFunction *MF;

+ 1 - 1
lib/CodeGen/RegAllocSimple.cpp

@@ -41,7 +41,7 @@ namespace {
   class VISIBILITY_HIDDEN RegAllocSimple : public MachineFunctionPass {
   public:
     static char ID;
-    RegAllocSimple() : MachineFunctionPass((intptr_t)&ID) {}
+    RegAllocSimple() : MachineFunctionPass(&ID) {}
   private:
     MachineFunction *MF;
     const TargetMachine *TM;

+ 1 - 1
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

@@ -158,7 +158,7 @@ MachineBasicBlock *TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
 //===----------------------------------------------------------------------===//
 
 SelectionDAGISel::SelectionDAGISel(TargetLowering &tli, bool fast) :
-  FunctionPass((intptr_t)&ID), TLI(tli),
+  FunctionPass(&ID), TLI(tli),
   FuncInfo(new FunctionLoweringInfo(TLI)),
   CurDAG(new SelectionDAG(TLI, *FuncInfo)),
   SDL(new SelectionDAGLowering(*CurDAG, TLI, *FuncInfo)),

+ 1 - 1
lib/CodeGen/SimpleRegisterCoalescing.h

@@ -102,7 +102,7 @@ namespace llvm {
 
   public:
     static char ID; // Pass identifcation, replacement for typeid
-    SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {}
+    SimpleRegisterCoalescing() : MachineFunctionPass(&ID) {}
 
     struct InstrSlots {
       enum {

+ 1 - 1
lib/CodeGen/StackSlotColoring.cpp

@@ -62,7 +62,7 @@ namespace {
 
   public:
     static char ID; // Pass identification
-    StackSlotColoring() : MachineFunctionPass((intptr_t)&ID), NextColor(-1) {}
+    StackSlotColoring() : MachineFunctionPass(&ID), NextColor(-1) {}
     
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<LiveStacks>();

+ 1 - 1
lib/CodeGen/StrongPHIElimination.cpp

@@ -38,7 +38,7 @@ using namespace llvm;
 namespace {
   struct VISIBILITY_HIDDEN StrongPHIElimination : public MachineFunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    StrongPHIElimination() : MachineFunctionPass((intptr_t)&ID) {}
+    StrongPHIElimination() : MachineFunctionPass(&ID) {}
 
     // Waiting stores, for each MBB, the set of copies that need to
     // be inserted into that MBB

+ 1 - 1
lib/CodeGen/TwoAddressInstructionPass.cpp

@@ -70,7 +70,7 @@ namespace {
                              DenseMap<MachineInstr*, unsigned> &DistanceMap);
   public:
     static char ID; // Pass identification, replacement for typeid
-    TwoAddressInstructionPass() : MachineFunctionPass((intptr_t)&ID) {}
+    TwoAddressInstructionPass() : MachineFunctionPass(&ID) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addPreserved<LiveVariables>();

+ 2 - 2
lib/CodeGen/UnreachableBlockElim.cpp

@@ -40,7 +40,7 @@ namespace {
     virtual bool runOnFunction(Function &F);
   public:
     static char ID; // Pass identification, replacement for typeid
-    UnreachableBlockElim() : FunctionPass((intptr_t)&ID) {}
+    UnreachableBlockElim() : FunctionPass(&ID) {}
   };
 }
 char UnreachableBlockElim::ID = 0;
@@ -90,7 +90,7 @@ namespace {
     
   public:
     static char ID; // Pass identification, replacement for typeid
-    UnreachableMachineBlockElim() : MachineFunctionPass((intptr_t)&ID) {}
+    UnreachableMachineBlockElim() : MachineFunctionPass(&ID) {}
   };
 }
 char UnreachableMachineBlockElim::ID = 0;

+ 2 - 2
lib/Target/ARM/ARMCodeEmitter.cpp

@@ -39,11 +39,11 @@ namespace {
   public:
     static char ID;
     explicit ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
-      : MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm),
+      : MachineFunctionPass(&ID), II(0), TD(0), TM(tm),
       MCE(mce) {}
     ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
             const ARMInstrInfo &ii, const TargetData &td)
-      : MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm),
+      : MachineFunctionPass(&ID), II(&ii), TD(&td), TM(tm),
       MCE(mce) {}
 
     bool runOnMachineFunction(MachineFunction &MF);

+ 1 - 1
lib/Target/ARM/ARMConstantIslandPass.cpp

@@ -129,7 +129,7 @@ namespace {
     bool isThumb;
   public:
     static char ID;
-    ARMConstantIslands() : MachineFunctionPass((intptr_t)&ID) {}
+    ARMConstantIslands() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
 

+ 1 - 1
lib/Target/ARM/ARMLoadStoreOptimizer.cpp

@@ -39,7 +39,7 @@ STATISTIC(NumFSTMGened, "Number of fstm instructions generated");
 namespace {
   struct VISIBILITY_HIDDEN ARMLoadStoreOpt : public MachineFunctionPass {
     static char ID;
-    ARMLoadStoreOpt() : MachineFunctionPass((intptr_t)&ID) {}
+    ARMLoadStoreOpt() : MachineFunctionPass(&ID) {}
 
     const TargetInstrInfo *TII;
     const TargetRegisterInfo *TRI;

+ 1 - 1
lib/Target/Alpha/AlphaBranchSelector.cpp

@@ -23,7 +23,7 @@ using namespace llvm;
 namespace {
   struct VISIBILITY_HIDDEN AlphaBSel : public MachineFunctionPass {
     static char ID;
-    AlphaBSel() : MachineFunctionPass((intptr_t)&ID) {}
+    AlphaBSel() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
 

+ 2 - 2
lib/Target/Alpha/AlphaCodeEmitter.cpp

@@ -39,10 +39,10 @@ namespace {
   public:
     static char ID;
     explicit AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
-      : MachineFunctionPass((intptr_t)&ID), II(0), TM(tm), MCE(mce) {}
+      : MachineFunctionPass(&ID), II(0), TM(tm), MCE(mce) {}
     AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
                      const AlphaInstrInfo& ii)
-      : MachineFunctionPass((intptr_t)&ID), II(&ii), TM(tm), MCE(mce) {}
+      : MachineFunctionPass(&ID), II(&ii), TM(tm), MCE(mce) {}
 
     bool runOnMachineFunction(MachineFunction &MF);
 

+ 1 - 1
lib/Target/Alpha/AlphaLLRP.cpp

@@ -39,7 +39,7 @@ namespace {
 
     static char ID;
     AlphaLLRPPass(AlphaTargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
+      : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "Alpha NOP inserter";

+ 2 - 2
lib/Target/CBackend/CBackend.cpp

@@ -60,7 +60,7 @@ namespace {
   public:
     static char ID;
     CBackendNameAllUsedStructsAndMergeFunctions() 
-      : ModulePass((intptr_t)&ID) {}
+      : ModulePass(&ID) {}
     void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<FindUsedTypes>();
     }
@@ -92,7 +92,7 @@ namespace {
   public:
     static char ID;
     explicit CWriter(raw_ostream &o)
-      : FunctionPass((intptr_t)&ID), Out(o), IL(0), Mang(0), LI(0), 
+      : FunctionPass(&ID), Out(o), IL(0), Mang(0), LI(0), 
         TheModule(0), TAsm(0), TD(0) {}
 
     virtual const char *getPassName() const { return "C backend"; }

+ 1 - 1
lib/Target/CppBackend/CPPBackend.cpp

@@ -103,7 +103,7 @@ namespace {
   public:
     static char ID;
     explicit CppWriter(raw_ostream &o) :
-      ModulePass((intptr_t)&ID), Out(o), uniqueNum(0), is_inline(false) {}
+      ModulePass(&ID), Out(o), uniqueNum(0), is_inline(false) {}
 
     virtual const char *getPassName() const { return "C++ backend"; }
 

+ 1 - 1
lib/Target/IA64/IA64Bundling.cpp

@@ -43,7 +43,7 @@ namespace {
     IA64TargetMachine &TM;
 
     IA64BundlingPass(IA64TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
+      : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "IA64 (Itanium) Bundling Pass";

+ 2 - 2
lib/Target/MSIL/MSILWriter.h

@@ -42,7 +42,7 @@ namespace {
     static char ID;
     MSILModule(const std::set<const Type *>*& _UsedTypes,
                const TargetData*& _TD)
-      : ModulePass((intptr_t)&ID), UsedTypes(_UsedTypes), TD(_TD) {}
+      : ModulePass(&ID), UsedTypes(_UsedTypes), TD(_TD) {}
 
     void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<FindUsedTypes>();
@@ -86,7 +86,7 @@ namespace {
       StaticInitList;
     const std::set<const Type *>* UsedTypes;
     static char ID;
-    MSILWriter(raw_ostream &o) : FunctionPass((intptr_t)&ID), Out(o) {
+    MSILWriter(raw_ostream &o) : FunctionPass(&ID), Out(o) {
       UniqID = 0;
     }
 

+ 1 - 1
lib/Target/Mips/MipsDelaySlotFiller.cpp

@@ -32,7 +32,7 @@ namespace {
 
     static char ID;
     Filler(TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
+      : MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { }
 
     virtual const char *getPassName() const {
       return "Mips Delay Slot Filler";

+ 1 - 1
lib/Target/PowerPC/PPCBranchSelector.cpp

@@ -32,7 +32,7 @@ STATISTIC(NumExpanded, "Number of branches expanded to long format");
 namespace {
   struct VISIBILITY_HIDDEN PPCBSel : public MachineFunctionPass {
     static char ID;
-    PPCBSel() : MachineFunctionPass((intptr_t)&ID) {}
+    PPCBSel() : MachineFunctionPass(&ID) {}
 
     /// BlockSizes - The sizes of the basic blocks in the function.
     std::vector<unsigned> BlockSizes;

+ 1 - 1
lib/Target/PowerPC/PPCCodeEmitter.cpp

@@ -48,7 +48,7 @@ namespace {
   public:
     static char ID;
     PPCCodeEmitter(TargetMachine &T, MachineCodeEmitter &M)
-      : MachineFunctionPass((intptr_t)&ID), TM(T), MCE(M) {}
+      : MachineFunctionPass(&ID), TM(T), MCE(M) {}
 
     const char *getPassName() const { return "PowerPC Machine Code Emitter"; }
 

+ 1 - 1
lib/Target/Sparc/DelaySlotFiller.cpp

@@ -32,7 +32,7 @@ namespace {
 
     static char ID;
     Filler(TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
+      : MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { }
 
     virtual const char *getPassName() const {
       return "SPARC Delay Slot Filler";

+ 1 - 1
lib/Target/Sparc/FPMover.cpp

@@ -34,7 +34,7 @@ namespace {
     
     static char ID;
     FPMover(TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
+      : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "Sparc Double-FP Move Fixer";

+ 1 - 1
lib/Target/TargetData.cpp

@@ -232,7 +232,7 @@ void TargetData::init(const std::string &TargetDescription) {
 }
 
 TargetData::TargetData(const Module *M) 
-  : ImmutablePass((intptr_t)&ID) {
+  : ImmutablePass(&ID) {
   init(M->getDataLayout());
 }
 

+ 2 - 2
lib/Target/X86/X86CodeEmitter.cpp

@@ -46,12 +46,12 @@ namespace {
   public:
     static char ID;
     explicit Emitter(X86TargetMachine &tm, MachineCodeEmitter &mce)
-      : MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm), 
+      : MachineFunctionPass(&ID), II(0), TD(0), TM(tm), 
       MCE(mce), PICBaseOffset(0), Is64BitMode(false),
       IsPIC(TM.getRelocationModel() == Reloc::PIC_) {}
     Emitter(X86TargetMachine &tm, MachineCodeEmitter &mce,
             const X86InstrInfo &ii, const TargetData &td, bool is64)
-      : MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm), 
+      : MachineFunctionPass(&ID), II(&ii), TD(&td), TM(tm), 
       MCE(mce), PICBaseOffset(0), Is64BitMode(is64),
       IsPIC(TM.getRelocationModel() == Reloc::PIC_) {}
 

+ 1 - 1
lib/Target/X86/X86FloatingPoint.cpp

@@ -53,7 +53,7 @@ STATISTIC(NumFP  , "Number of floating point instructions");
 namespace {
   struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
     static char ID;
-    FPS() : MachineFunctionPass((intptr_t)&ID) {}
+    FPS() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
 

+ 1 - 1
lib/Target/X86/X86RegisterInfo.cpp

@@ -1118,7 +1118,7 @@ unsigned getX86SubSuperRegister(unsigned Reg, MVT VT, bool High) {
 namespace {
   struct VISIBILITY_HIDDEN MSAC : public MachineFunctionPass {
     static char ID;
-    MSAC() : MachineFunctionPass((intptr_t)&ID) {}
+    MSAC() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF) {
       MachineFrameInfo *FFI = MF.getFrameInfo();

+ 2 - 2
lib/Transforms/Hello/Hello.cpp

@@ -26,7 +26,7 @@ namespace {
   // Hello - The first implementation, without getAnalysisUsage.
   struct Hello : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    Hello() : FunctionPass((intptr_t)&ID) {}
+    Hello() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F) {
       HelloCounter++;
@@ -45,7 +45,7 @@ namespace {
   // Hello2 - The second implementation with getAnalysisUsage implemented.
   struct Hello2 : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    Hello2() : FunctionPass((intptr_t)&ID) {}
+    Hello2() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F) {
       HelloCounter++;

+ 1 - 1
lib/Transforms/IPO/ArgumentPromotion.cpp

@@ -66,7 +66,7 @@ namespace {
 
     virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
     static char ID; // Pass identification, replacement for typeid
-    ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass((intptr_t)&ID),
+    ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass(&ID),
                                              maxElements(maxElements) {}
     
     /// A vector used to hold the indices of a single GEP instruction

+ 1 - 1
lib/Transforms/IPO/ConstantMerge.cpp

@@ -31,7 +31,7 @@ STATISTIC(NumMerged, "Number of global constants merged");
 namespace {
   struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass {
     static char ID; // Pass identification, replacement for typeid
-    ConstantMerge() : ModulePass((intptr_t)&ID) {}
+    ConstantMerge() : ModulePass(&ID) {}
 
     // run - For this pass, process all of the globals in the module,
     // eliminating duplicate constants.

+ 1 - 1
lib/Transforms/IPO/DeadArgumentElimination.cpp

@@ -121,7 +121,7 @@ namespace {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    DAE() : ModulePass((intptr_t)&ID) {}
+    DAE() : ModulePass(&ID) {}
     bool runOnModule(Module &M);
 
     virtual bool ShouldHackArguments() const { return false; }

+ 1 - 1
lib/Transforms/IPO/DeadTypeElimination.cpp

@@ -27,7 +27,7 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab");
 namespace {
   struct VISIBILITY_HIDDEN DTE : public ModulePass {
     static char ID; // Pass identification, replacement for typeid
-    DTE() : ModulePass((intptr_t)&ID) {}
+    DTE() : ModulePass(&ID) {}
 
     // doPassInitialization - For this pass, it removes global symbol table
     // entries for primitive types.  These are never used for linking in GCC and

+ 1 - 1
lib/Transforms/IPO/ExtractGV.cpp

@@ -35,7 +35,7 @@ namespace {
     ///
     explicit GVExtractorPass(std::vector<GlobalValue*>& GVs, bool deleteS = true,
                              bool relinkCallees = false)
-      : ModulePass((intptr_t)&ID), Named(GVs), deleteStuff(deleteS),
+      : ModulePass(&ID), Named(GVs), deleteStuff(deleteS),
         reLink(relinkCallees) {}
 
     bool runOnModule(Module &M) {

+ 1 - 1
lib/Transforms/IPO/GlobalDCE.cpp

@@ -31,7 +31,7 @@ STATISTIC(NumVariables, "Number of global variables removed");
 namespace {
   struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass {
     static char ID; // Pass identification, replacement for typeid
-    GlobalDCE() : ModulePass((intptr_t)&ID) {}
+    GlobalDCE() : ModulePass(&ID) {}
  
     // run - Do the GlobalDCE pass on the specified module, optionally updating
     // the specified callgraph to reflect the changes.

+ 1 - 1
lib/Transforms/IPO/GlobalOpt.cpp

@@ -57,7 +57,7 @@ namespace {
       AU.addRequired<TargetData>();
     }
     static char ID; // Pass identification, replacement for typeid
-    GlobalOpt() : ModulePass((intptr_t)&ID) {}
+    GlobalOpt() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M);
 

+ 1 - 1
lib/Transforms/IPO/IPConstantPropagation.cpp

@@ -36,7 +36,7 @@ namespace {
   ///
   struct VISIBILITY_HIDDEN IPCP : public ModulePass {
     static char ID; // Pass identification, replacement for typeid
-    IPCP() : ModulePass((intptr_t)&ID) {}
+    IPCP() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M);
   private:

+ 1 - 1
lib/Transforms/IPO/IndMemRemoval.cpp

@@ -33,7 +33,7 @@ namespace {
   class VISIBILITY_HIDDEN IndMemRemPass : public ModulePass {
   public:
     static char ID; // Pass identification, replacement for typeid
-    IndMemRemPass() : ModulePass((intptr_t)&ID) {}
+    IndMemRemPass() : ModulePass(&ID) {}
 
     virtual bool runOnModule(Module &M);
   };

+ 4 - 4
lib/Transforms/IPO/Inliner.cpp

@@ -34,11 +34,11 @@ static cl::opt<int>
 InlineLimit("inline-threshold", cl::Hidden, cl::init(200),
         cl::desc("Control the amount of inlining to perform (default = 200)"));
 
-Inliner::Inliner(const void *ID) 
-  : CallGraphSCCPass((intptr_t)ID), InlineThreshold(InlineLimit) {}
+Inliner::Inliner(void *ID) 
+  : CallGraphSCCPass(ID), InlineThreshold(InlineLimit) {}
 
-Inliner::Inliner(const void *ID, int Threshold) 
-  : CallGraphSCCPass((intptr_t)ID), InlineThreshold(Threshold) {}
+Inliner::Inliner(void *ID, int Threshold) 
+  : CallGraphSCCPass(ID), InlineThreshold(Threshold) {}
 
 /// getAnalysisUsage - For this class, we declare that we require and preserve
 /// the call graph.  If the derived class implements this method, it should

+ 2 - 2
lib/Transforms/IPO/Internalize.cpp

@@ -60,7 +60,7 @@ static RegisterPass<InternalizePass>
 X("internalize", "Internalize Global Symbols");
 
 InternalizePass::InternalizePass(bool AllButMain)
-  : ModulePass((intptr_t)&ID), AllButMain(AllButMain){
+  : ModulePass(&ID), AllButMain(AllButMain){
   if (!APIFile.empty())           // If a filename is specified, use it.
     LoadFile(APIFile.c_str());
   if (!APIList.empty())           // If a list is specified, use it as well.
@@ -68,7 +68,7 @@ InternalizePass::InternalizePass(bool AllButMain)
 }
 
 InternalizePass::InternalizePass(const std::vector<const char *>&exportList) 
-  : ModulePass((intptr_t)&ID), AllButMain(false){
+  : ModulePass(&ID), AllButMain(false){
   for(std::vector<const char *>::const_iterator itr = exportList.begin();
         itr != exportList.end(); itr++) {
     ExternalNames.insert(*itr);

+ 3 - 3
lib/Transforms/IPO/LoopExtractor.cpp

@@ -41,7 +41,7 @@ namespace {
     unsigned NumLoops;
 
     explicit LoopExtractor(unsigned numLoops = ~0) 
-      : FunctionPass((intptr_t)&ID), NumLoops(numLoops) {}
+      : FunctionPass(&ID), NumLoops(numLoops) {}
 
     virtual bool runOnFunction(Function &F);
 
@@ -167,11 +167,11 @@ namespace {
   public:
     static char ID; // Pass identification, replacement for typeid
     explicit BlockExtractorPass(const std::vector<BasicBlock*> &B) 
-      : ModulePass((intptr_t)&ID), BlocksToNotExtract(B) {
+      : ModulePass(&ID), BlocksToNotExtract(B) {
       if (!BlockFile.empty())
         LoadFile(BlockFile.c_str());
     }
-    BlockExtractorPass() : ModulePass((intptr_t)&ID) {}
+    BlockExtractorPass() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M);
   };

+ 1 - 1
lib/Transforms/IPO/LowerSetJmp.cpp

@@ -112,7 +112,7 @@ namespace {
     bool IsTransformableFunction(const std::string& Name);
   public:
     static char ID; // Pass identification, replacement for typeid
-    LowerSetJmp() : ModulePass((intptr_t)&ID) {}
+    LowerSetJmp() : ModulePass(&ID) {}
 
     void visitCallInst(CallInst& CI);
     void visitInvokeInst(InvokeInst& II);

+ 1 - 1
lib/Transforms/IPO/PartialSpecialization.cpp

@@ -45,7 +45,7 @@ namespace {
     int scanDistribution(Function&, int, std::map<Constant*, int>&);
   public :
     static char ID; // Pass identification, replacement for typeid
-    PartSpec() : ModulePass((intptr_t)&ID) {}
+    PartSpec() : ModulePass(&ID) {}
     bool runOnModule(Module &M);
   };
 }

+ 1 - 1
lib/Transforms/IPO/PruneEH.cpp

@@ -35,7 +35,7 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized");
 namespace {
   struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
     static char ID; // Pass identification, replacement for typeid
-    PruneEH() : CallGraphSCCPass((intptr_t)&ID) {}
+    PruneEH() : CallGraphSCCPass(&ID) {}
 
     // runOnSCC - Analyze the SCC, performing the transformation if possible.
     bool runOnSCC(const std::vector<CallGraphNode *> &SCC);

+ 1 - 1
lib/Transforms/IPO/RaiseAllocations.cpp

@@ -37,7 +37,7 @@ namespace {
   public:
     static char ID; // Pass identification, replacement for typeid
     RaiseAllocations() 
-      : ModulePass((intptr_t)&ID), MallocFunc(0), FreeFunc(0) {}
+      : ModulePass(&ID), MallocFunc(0), FreeFunc(0) {}
 
     // doPassInitialization - For the raise allocations pass, this finds a
     // declaration for malloc and free if they exist.

+ 1 - 1
lib/Transforms/IPO/StripDeadPrototypes.cpp

@@ -30,7 +30,7 @@ namespace {
 class VISIBILITY_HIDDEN StripDeadPrototypesPass : public ModulePass {
 public:
   static char ID; // Pass identification, replacement for typeid
-  StripDeadPrototypesPass() : ModulePass((intptr_t)&ID) { }
+  StripDeadPrototypesPass() : ModulePass(&ID) { }
   virtual bool runOnModule(Module &M);
 };
 

+ 1 - 1
lib/Transforms/IPO/StripSymbols.cpp

@@ -38,7 +38,7 @@ namespace {
   public:
     static char ID; // Pass identification, replacement for typeid
     explicit StripSymbols(bool ODI = false) 
-      : ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {}
+      : ModulePass(&ID), OnlyDebugInfo(ODI) {}
 
     virtual bool runOnModule(Module &M);
 

+ 1 - 1
lib/Transforms/IPO/StructRetPromotion.cpp

@@ -49,7 +49,7 @@ namespace {
 
     virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
     static char ID; // Pass identification, replacement for typeid
-    SRETPromotion() : CallGraphSCCPass((intptr_t)&ID) {}
+    SRETPromotion() : CallGraphSCCPass(&ID) {}
 
   private:
     bool PromoteReturn(CallGraphNode *CGN);

+ 1 - 1
lib/Transforms/Instrumentation/EdgeProfiling.cpp

@@ -34,7 +34,7 @@ namespace {
     bool runOnModule(Module &M);
   public:
     static char ID; // Pass identification, replacement for typeid
-    EdgeProfiler() : ModulePass((intptr_t)&ID) {}
+    EdgeProfiler() : ModulePass(&ID) {}
   };
 }
 

+ 1 - 1
lib/Transforms/Instrumentation/RSProfiling.cpp

@@ -144,7 +144,7 @@ namespace {
   /// ProfilerRS - Insert the random sampling framework
   struct VISIBILITY_HIDDEN ProfilerRS : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    ProfilerRS() : FunctionPass((intptr_t)&ID) {}
+    ProfilerRS() : FunctionPass(&ID) {}
 
     std::map<Value*, Value*> TransCache;
     std::set<BasicBlock*> ChoicePoints;

+ 1 - 1
lib/Transforms/Scalar/ADCE.cpp

@@ -35,7 +35,7 @@ STATISTIC(NumRemoved, "Number of instructions removed");
 namespace {
   struct VISIBILITY_HIDDEN ADCE : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    ADCE() : FunctionPass((intptr_t)&ID) {}
+    ADCE() : FunctionPass(&ID) {}
     
     virtual bool runOnFunction(Function& F);
     

+ 1 - 1
lib/Transforms/Scalar/BasicBlockPlacement.cpp

@@ -42,7 +42,7 @@ STATISTIC(NumMoved, "Number of basic blocks moved");
 namespace {
   struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    BlockPlacement() : FunctionPass((intptr_t)&ID) {}
+    BlockPlacement() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F);
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است