diff --git a/llvm/include/llvm/Analysis/Dominators.h b/llvm/include/llvm/Analysis/Dominators.h index 6e944d32b366..94ab04eb56bf 100644 --- a/llvm/include/llvm/Analysis/Dominators.h +++ b/llvm/include/llvm/Analysis/Dominators.h @@ -720,7 +720,7 @@ public: static char ID; // Pass ID, replacement for typeid DominatorTreeBase* DT; - DominatorTree() : FunctionPass(intptr_t(&ID)) { + DominatorTree() : FunctionPass(&ID) { DT = new DominatorTreeBase(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!"); diff --git a/llvm/include/llvm/Analysis/FindUsedTypes.h b/llvm/include/llvm/Analysis/FindUsedTypes.h index d3e62e269654..35e4e6f3f9e2 100644 --- a/llvm/include/llvm/Analysis/FindUsedTypes.h +++ b/llvm/include/llvm/Analysis/FindUsedTypes.h @@ -25,7 +25,7 @@ class FindUsedTypes : public ModulePass { std::set 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. diff --git a/llvm/include/llvm/Analysis/IntervalPartition.h b/llvm/include/llvm/Analysis/IntervalPartition.h index e724681fa493..feae6d82f82f 100644 --- a/llvm/include/llvm/Analysis/IntervalPartition.h +++ b/llvm/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); diff --git a/llvm/include/llvm/Analysis/LoopPass.h b/llvm/include/llvm/Analysis/LoopPass.h index 60ad0d95190c..af6a6177c1b0 100644 --- a/llvm/include/llvm/Analysis/LoopPass.h +++ b/llvm/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. diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h index c6ef41ff2404..c606b22acee0 100644 --- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/llvm/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. /// diff --git a/llvm/include/llvm/Analysis/PostDominators.h b/llvm/include/llvm/Analysis/PostDominators.h index b99fafcfc9f2..cd6af74024a5 100644 --- a/llvm/include/llvm/Analysis/PostDominators.h +++ b/llvm/include/llvm/Analysis/PostDominators.h @@ -25,7 +25,7 @@ struct PostDominatorTree : public FunctionPass { static char ID; // Pass identification, replacement for typeid DominatorTreeBase* DT; - PostDominatorTree() : FunctionPass((intptr_t)&ID) { + PostDominatorTree() : FunctionPass(&ID) { DT = new DominatorTreeBase(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(); diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index e5b10c9d59a7..e16e990bad2d 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/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. diff --git a/llvm/include/llvm/CallGraphSCCPass.h b/llvm/include/llvm/CallGraphSCCPass.h index 26005059dee5..d5ff17cf247c 100644 --- a/llvm/include/llvm/CallGraphSCCPass.h +++ b/llvm/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. diff --git a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h index a43c2d4b982f..c77513ca9864 100644 --- a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/llvm/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 { diff --git a/llvm/include/llvm/CodeGen/LiveStackAnalysis.h b/llvm/include/llvm/CodeGen/LiveStackAnalysis.h index 87ed67fa0000..5c88bb83c529 100644 --- a/llvm/include/llvm/CodeGen/LiveStackAnalysis.h +++ b/llvm/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; diff --git a/llvm/include/llvm/CodeGen/LiveVariables.h b/llvm/include/llvm/CodeGen/LiveVariables.h index e2bed5c2ef99..18fa6f1f02b8 100644 --- a/llvm/include/llvm/CodeGen/LiveVariables.h +++ b/llvm/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 diff --git a/llvm/include/llvm/CodeGen/MachineFunctionPass.h b/llvm/include/llvm/CodeGen/MachineFunctionPass.h index a72563fb0af5..95bb2bf510d5 100644 --- a/llvm/include/llvm/CodeGen/MachineFunctionPass.h +++ b/llvm/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 diff --git a/llvm/include/llvm/Transforms/IPO/InlinerPass.h b/llvm/include/llvm/Transforms/IPO/InlinerPass.h index d34641def09b..e0a3d2943e56 100644 --- a/llvm/include/llvm/Transforms/IPO/InlinerPass.h +++ b/llvm/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 diff --git a/llvm/include/llvm/Transforms/RSProfiling.h b/llvm/include/llvm/Transforms/RSProfiling.h index b44a992bd3dc..98ec396a26a0 100644 --- a/llvm/include/llvm/Transforms/RSProfiling.h +++ b/llvm/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. diff --git a/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h b/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h index 598adfc0bce0..c2d09935e76c 100644 --- a/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h +++ b/llvm/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 diff --git a/llvm/lib/Analysis/AliasAnalysisCounter.cpp b/llvm/lib/Analysis/AliasAnalysisCounter.cpp index de40ad8deef2..4362d7d301a8 100644 --- a/llvm/lib/Analysis/AliasAnalysisCounter.cpp +++ b/llvm/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; } diff --git a/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp b/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp index af15d0f4adf5..c7a86d3506fc 100644 --- a/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/llvm/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(); diff --git a/llvm/lib/Analysis/AliasDebugger.cpp b/llvm/lib/Analysis/AliasDebugger.cpp index 06a43b11dd5d..0bbd739351fe 100644 --- a/llvm/lib/Analysis/AliasDebugger.cpp +++ b/llvm/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 diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index 398bf5aca5b4..608da93f5738 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/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(); diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index b417a484760c..7d4309353a40 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/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(); @@ -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); diff --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp index e20a0a2f876f..46d3930bd676 100644 --- a/llvm/lib/Analysis/CFGPrinter.cpp +++ b/llvm/lib/Analysis/CFGPrinter.cpp @@ -92,7 +92,7 @@ struct DOTGraphTraits : 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; diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index c6075e1c6106..9e07189a77dd 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/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); diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp index 19d0fd519079..5616ee9a4b03 100644 --- a/llvm/lib/Analysis/IPA/CallGraph.cpp +++ b/llvm/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. diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp index 4a0e4cfe057d..b8343cf4ce8c 100644 --- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/llvm/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. diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index 9a7580b9c8df..3583f8db4f31 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/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 diff --git a/llvm/lib/Analysis/InstCount.cpp b/llvm/lib/Analysis/InstCount.cpp index 5f33a60e6fd3..2dea7b3ef687 100644 --- a/llvm/lib/Analysis/InstCount.cpp +++ b/llvm/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); diff --git a/llvm/lib/Analysis/IntervalPartition.cpp b/llvm/lib/Analysis/IntervalPartition.cpp index adb6e9df24fe..cb8a85da552a 100644 --- a/llvm/lib/Analysis/IntervalPartition.cpp +++ b/llvm/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 diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index b9e5f99f07c5..7ebd4d39427b 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/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; diff --git a/llvm/lib/Analysis/ProfileInfo.cpp b/llvm/lib/Analysis/ProfileInfo.cpp index 047491baeeeb..a0965b66da81 100644 --- a/llvm/lib/Analysis/ProfileInfo.cpp +++ b/llvm/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 diff --git a/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp b/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp index b2fa9e45e717..0a8a87bd0f97 100644 --- a/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp +++ b/llvm/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; } diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp index 522060e78e71..dd16fabbd7ad 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index a720f04a9ae4..03a61d42cd16 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/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) {} diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 2ccfd191a093..11866a151841 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/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; diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp index 6f29112caf45..0b6e0b1b1031 100644 --- a/llvm/lib/CodeGen/ELFWriter.cpp +++ b/llvm/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; diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp index efb89e128e4d..f2978f88882c 100644 --- a/llvm/lib/CodeGen/GCMetadata.cpp +++ b/llvm/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(); diff --git a/llvm/lib/CodeGen/GCStrategy.cpp b/llvm/lib/CodeGen/GCStrategy.cpp index d46b5256870a..517b3a7762e7 100644 --- a/llvm/lib/CodeGen/GCStrategy.cpp +++ b/llvm/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"; diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index 079b70164802..38fce9b435c5 100644 --- a/llvm/lib/CodeGen/IfConversion.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/CodeGen/LoopAligner.cpp b/llvm/lib/CodeGen/LoopAligner.cpp index 44f5bb461dc0..51c635661f21 100644 --- a/llvm/lib/CodeGen/LoopAligner.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/CodeGen/LowerSubregs.cpp b/llvm/lib/CodeGen/LowerSubregs.cpp index 90bd595d7a54..6e115ddb137a 100644 --- a/llvm/lib/CodeGen/LowerSubregs.cpp +++ b/llvm/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"; diff --git a/llvm/lib/CodeGen/MachOWriter.cpp b/llvm/lib/CodeGen/MachOWriter.cpp index 9f1cb00ca70b..253c5ca5f460 100644 --- a/llvm/lib/CodeGen/MachOWriter.cpp +++ b/llvm/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(); diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index ae97d890db50..5aade03031e6 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 709234753d40..723811932fa8 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/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); diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 2010d17f856c..69f8d3c014c8 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index b4e72fed28db..0f608d637c53 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/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); diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index ceba842970d3..bd389db31f3a 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/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); diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp index 8c9776e07a94..41981d3ff145 100644 --- a/llvm/lib/CodeGen/PostRASchedulerList.cpp +++ b/llvm/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; diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index be8a54e03d1c..51d3698dc58f 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/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"; diff --git a/llvm/lib/CodeGen/RegAllocBigBlock.cpp b/llvm/lib/CodeGen/RegAllocBigBlock.cpp index 215f9430997e..380ad059cf62 100644 --- a/llvm/lib/CodeGen/RegAllocBigBlock.cpp +++ b/llvm/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 /// diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index c6f714a9cb7d..91dda7714759 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/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 IntervalPtr; typedef SmallVector IntervalPtrs; diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index 5946e7490220..d66031776e3d 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/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; diff --git a/llvm/lib/CodeGen/RegAllocSimple.cpp b/llvm/lib/CodeGen/RegAllocSimple.cpp index 9ad38405ae77..87b09a2a0dce 100644 --- a/llvm/lib/CodeGen/RegAllocSimple.cpp +++ b/llvm/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; diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 2b9ba38f20c0..b4ba64ea2798 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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)), diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.h b/llvm/lib/CodeGen/SimpleRegisterCoalescing.h index 62738952aa2c..41d1dfb20b01 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.h +++ b/llvm/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 { diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp index 6d0e2148c59b..ab980a14ec64 100644 --- a/llvm/lib/CodeGen/StackSlotColoring.cpp +++ b/llvm/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(); diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp index 9f59417b5dc0..ebe0c01aab99 100644 --- a/llvm/lib/CodeGen/StrongPHIElimination.cpp +++ b/llvm/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 diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index 51a3c5f52ed9..16b57a02b61e 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -70,7 +70,7 @@ namespace { DenseMap &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(); diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp index 7bf95bf96e55..3c3fca51b66f 100644 --- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp +++ b/llvm/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; diff --git a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp index 16b00417b35d..80f68984a5e2 100644 --- a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/llvm/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); diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp index f577de5b3652..73c56182a189 100644 --- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/llvm/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); diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 5eeeafbac1cc..8bd4caa6fd63 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/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; diff --git a/llvm/lib/Target/Alpha/AlphaBranchSelector.cpp b/llvm/lib/Target/Alpha/AlphaBranchSelector.cpp index f1d60c836f7b..aca8ca734897 100644 --- a/llvm/lib/Target/Alpha/AlphaBranchSelector.cpp +++ b/llvm/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); diff --git a/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp b/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp index 40e14135a40a..b51440932f79 100644 --- a/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp +++ b/llvm/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); diff --git a/llvm/lib/Target/Alpha/AlphaLLRP.cpp b/llvm/lib/Target/Alpha/AlphaLLRP.cpp index f4dd199d3540..7a1b78497b82 100644 --- a/llvm/lib/Target/Alpha/AlphaLLRP.cpp +++ b/llvm/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"; diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp index 456bda34e733..a1222daf3f20 100644 --- a/llvm/lib/Target/CBackend/CBackend.cpp +++ b/llvm/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(); } @@ -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"; } diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp index 33326e14d0c4..b39d77493207 100644 --- a/llvm/lib/Target/CppBackend/CPPBackend.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/Target/IA64/IA64Bundling.cpp b/llvm/lib/Target/IA64/IA64Bundling.cpp index cac007cef265..c5bc83e134b2 100644 --- a/llvm/lib/Target/IA64/IA64Bundling.cpp +++ b/llvm/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"; diff --git a/llvm/lib/Target/MSIL/MSILWriter.h b/llvm/lib/Target/MSIL/MSILWriter.h index b141e23d64cf..c64ceeeff594 100644 --- a/llvm/lib/Target/MSIL/MSILWriter.h +++ b/llvm/lib/Target/MSIL/MSILWriter.h @@ -42,7 +42,7 @@ namespace { static char ID; MSILModule(const std::set*& _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(); @@ -86,7 +86,7 @@ namespace { StaticInitList; const std::set* UsedTypes; static char ID; - MSILWriter(raw_ostream &o) : FunctionPass((intptr_t)&ID), Out(o) { + MSILWriter(raw_ostream &o) : FunctionPass(&ID), Out(o) { UniqID = 0; } diff --git a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp index 881cd1292901..4825b29d7115 100644 --- a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp +++ b/llvm/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"; diff --git a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp index ab988ba823ee..2fc5b3c025a1 100644 --- a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp +++ b/llvm/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 BlockSizes; diff --git a/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp b/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp index 3326cf7f16d1..a77c7266857a 100644 --- a/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/llvm/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"; } diff --git a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp index 818573253f04..f6648a870058 100644 --- a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp +++ b/llvm/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"; diff --git a/llvm/lib/Target/Sparc/FPMover.cpp b/llvm/lib/Target/Sparc/FPMover.cpp index 016215b9717d..a542fc5198c6 100644 --- a/llvm/lib/Target/Sparc/FPMover.cpp +++ b/llvm/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"; diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index f83adefbee34..650f91eee1be 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/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()); } diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index c3a1ed921a7c..1c81b4b6fc04 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/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_) {} diff --git a/llvm/lib/Target/X86/X86FloatingPoint.cpp b/llvm/lib/Target/X86/X86FloatingPoint.cpp index 7dadd44b1cee..5da02c64742f 100644 --- a/llvm/lib/Target/X86/X86FloatingPoint.cpp +++ b/llvm/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); diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index 4f335ab76252..d7bf93974e61 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/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(); diff --git a/llvm/lib/Transforms/Hello/Hello.cpp b/llvm/lib/Transforms/Hello/Hello.cpp index f2a8322550f8..d07f6135257f 100644 --- a/llvm/lib/Transforms/Hello/Hello.cpp +++ b/llvm/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++; diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 5934c5ea24e9..97433801da28 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -66,7 +66,7 @@ namespace { virtual bool runOnSCC(const std::vector &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 diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp index 86cfcc4624aa..b4bab2d0e7e8 100644 --- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp +++ b/llvm/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. diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp index 5f1920b0618a..ec8f1364e823 100644 --- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/llvm/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; } diff --git a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp index 3cb658ef72f1..85aed2b7915d 100644 --- a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/llvm/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 diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp index 03a8e5cebca9..d409b6e8067e 100644 --- a/llvm/lib/Transforms/IPO/ExtractGV.cpp +++ b/llvm/lib/Transforms/IPO/ExtractGV.cpp @@ -35,7 +35,7 @@ namespace { /// explicit GVExtractorPass(std::vector& 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) { diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp index 608705b10a05..020c70ab375b 100644 --- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp +++ b/llvm/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. diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index f63ef46a8505..f9a7c73534b0 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -57,7 +57,7 @@ namespace { AU.addRequired(); } static char ID; // Pass identification, replacement for typeid - GlobalOpt() : ModulePass((intptr_t)&ID) {} + GlobalOpt() : ModulePass(&ID) {} bool runOnModule(Module &M); diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp index 42c02e6a45c4..aecec44aea0e 100644 --- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/llvm/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: diff --git a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp b/llvm/lib/Transforms/IPO/IndMemRemoval.cpp index 84483748594b..2e09fe967f4f 100644 --- a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/llvm/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); }; diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index 38cb67dddf1d..88b6afdebb70 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -34,11 +34,11 @@ static cl::opt 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 diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp index 577d69cf60b8..cbfccf2a2c7b 100644 --- a/llvm/lib/Transforms/IPO/Internalize.cpp +++ b/llvm/lib/Transforms/IPO/Internalize.cpp @@ -60,7 +60,7 @@ static RegisterPass 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&exportList) - : ModulePass((intptr_t)&ID), AllButMain(false){ + : ModulePass(&ID), AllButMain(false){ for(std::vector::const_iterator itr = exportList.begin(); itr != exportList.end(); itr++) { ExternalNames.insert(*itr); diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp index 8e55b3f09192..0c654438d508 100644 --- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp +++ b/llvm/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 &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); }; diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp index 80158b43a5c0..d5997fb4b514 100644 --- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/llvm/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); diff --git a/llvm/lib/Transforms/IPO/PartialSpecialization.cpp b/llvm/lib/Transforms/IPO/PartialSpecialization.cpp index d39ea58ab672..949358e7bc90 100644 --- a/llvm/lib/Transforms/IPO/PartialSpecialization.cpp +++ b/llvm/lib/Transforms/IPO/PartialSpecialization.cpp @@ -45,7 +45,7 @@ namespace { int scanDistribution(Function&, int, std::map&); public : static char ID; // Pass identification, replacement for typeid - PartSpec() : ModulePass((intptr_t)&ID) {} + PartSpec() : ModulePass(&ID) {} bool runOnModule(Module &M); }; } diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp index d4194a1060ee..5e50e20af4db 100644 --- a/llvm/lib/Transforms/IPO/PruneEH.cpp +++ b/llvm/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 &SCC); diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp index daf8ef00053e..a81bbdb3c53d 100644 --- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/llvm/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. diff --git a/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp b/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp index 7db0aa8d129b..a94d78e276c5 100644 --- a/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp +++ b/llvm/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); }; diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp index 63e1a7beb042..6277f07de3ac 100644 --- a/llvm/lib/Transforms/IPO/StripSymbols.cpp +++ b/llvm/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); diff --git a/llvm/lib/Transforms/IPO/StructRetPromotion.cpp b/llvm/lib/Transforms/IPO/StructRetPromotion.cpp index 2f44d80ae489..2a7de3dc4918 100644 --- a/llvm/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/llvm/lib/Transforms/IPO/StructRetPromotion.cpp @@ -49,7 +49,7 @@ namespace { virtual bool runOnSCC(const std::vector &SCC); static char ID; // Pass identification, replacement for typeid - SRETPromotion() : CallGraphSCCPass((intptr_t)&ID) {} + SRETPromotion() : CallGraphSCCPass(&ID) {} private: bool PromoteReturn(CallGraphNode *CGN); diff --git a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 2cf824b25f5e..0831f3b7a480 100644 --- a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/llvm/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) {} }; } diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp index 45a7c712d8c7..c6cf4dfd6ebf 100644 --- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/llvm/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 TransCache; std::set ChoicePoints; diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index aef16f7f1cea..3481c0014358 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/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); diff --git a/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp index 041bed234b6f..fb9b88005b6a 100644 --- a/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/llvm/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 --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index da0d287817c9..a000c009cc6e 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -43,7 +43,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit CodeGenPrepare(const TargetLowering *tli = 0) - : FunctionPass((intptr_t)&ID), TLI(tli) {} + : FunctionPass(&ID), TLI(tli) {} bool runOnFunction(Function &F); private: diff --git a/llvm/lib/Transforms/Scalar/CondPropagate.cpp b/llvm/lib/Transforms/Scalar/CondPropagate.cpp index c1e419569f47..126e13e453aa 100644 --- a/llvm/lib/Transforms/Scalar/CondPropagate.cpp +++ b/llvm/lib/Transforms/Scalar/CondPropagate.cpp @@ -32,7 +32,7 @@ STATISTIC(NumSwThread, "Number of CFG edges threaded through switches"); namespace { struct VISIBILITY_HIDDEN CondProp : public FunctionPass { static char ID; // Pass identification, replacement for typeid - CondProp() : FunctionPass((intptr_t)&ID) {} + CondProp() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/ConstantProp.cpp b/llvm/lib/Transforms/Scalar/ConstantProp.cpp index 05bb4f0c7be7..b933488cf636 100644 --- a/llvm/lib/Transforms/Scalar/ConstantProp.cpp +++ b/llvm/lib/Transforms/Scalar/ConstantProp.cpp @@ -35,7 +35,7 @@ STATISTIC(NumInstKilled, "Number of instructions killed"); namespace { struct VISIBILITY_HIDDEN ConstantPropagation : public FunctionPass { static char ID; // Pass identification, replacement for typeid - ConstantPropagation() : FunctionPass((intptr_t)&ID) {} + ConstantPropagation() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp index a63fcb6589f7..cb78207d760b 100644 --- a/llvm/lib/Transforms/Scalar/DCE.cpp +++ b/llvm/lib/Transforms/Scalar/DCE.cpp @@ -69,7 +69,7 @@ namespace { // struct DCE : public FunctionPass { static char ID; // Pass identification, replacement for typeid - DCE() : FunctionPass((intptr_t)&ID) {} + DCE() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index b75d5c4be7ea..7e5fbcb8014b 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -39,7 +39,7 @@ STATISTIC(NumFastOther , "Number of other instrs removed"); namespace { struct VISIBILITY_HIDDEN DSE : public FunctionPass { static char ID; // Pass identification, replacement for typeid - DSE() : FunctionPass((intptr_t)&ID) {} + DSE() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F) { bool Changed = false; diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index b258fcc08c04..1e5be4ab1a77 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -697,7 +697,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - GVN() : FunctionPass((intptr_t)&ID) { } + GVN() : FunctionPass(&ID) { } private: ValueTable VN; diff --git a/llvm/lib/Transforms/Scalar/GVNPRE.cpp b/llvm/lib/Transforms/Scalar/GVNPRE.cpp index e0c869fbf8d5..e3b09379a22d 100644 --- a/llvm/lib/Transforms/Scalar/GVNPRE.cpp +++ b/llvm/lib/Transforms/Scalar/GVNPRE.cpp @@ -672,7 +672,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - GVNPRE() : FunctionPass((intptr_t)&ID) { } + GVNPRE() : FunctionPass(&ID) {} private: ValueTable VN; diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 5d709e50fbbf..3d29fd686378 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -70,7 +70,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid - IndVarSimplify() : LoopPass((intptr_t)&ID) {} + IndVarSimplify() : LoopPass(&ID) {} bool runOnLoop(Loop *L, LPPassManager &LPM); bool doInitialization(Loop *L, LPPassManager &LPM); diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index aedad72037ea..6b25f52a818e 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -80,7 +80,7 @@ namespace { bool MustPreserveLCSSA; public: static char ID; // Pass identification, replacement for typeid - InstCombiner() : FunctionPass((intptr_t)&ID) {} + InstCombiner() : FunctionPass(&ID) {} /// AddToWorkList - Add the specified instruction to the worklist if it /// isn't already in it. diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 1d3bfbfe7c2b..2f91c07c94e2 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -52,7 +52,7 @@ namespace { class VISIBILITY_HIDDEN JumpThreading : public FunctionPass { public: static char ID; // Pass identification - JumpThreading() : FunctionPass((intptr_t)&ID) {} + JumpThreading() : FunctionPass(&ID) {} bool runOnFunction(Function &F); bool ThreadBlock(BasicBlock *BB); diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index aef1cd6f6f8d..3eee4a27f7d6 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -74,7 +74,7 @@ EnableLICMConstantMotion("enable-licm-constant-variables", cl::Hidden, namespace { struct VISIBILITY_HIDDEN LICM : public LoopPass { static char ID; // Pass identification, replacement for typeid - LICM() : LoopPass((intptr_t)&ID) {} + LICM() : LoopPass(&ID) {} virtual bool runOnLoop(Loop *L, LPPassManager &LPM); diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp index f68a5f7125a0..74190f5f7769 100644 --- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp @@ -30,7 +30,7 @@ namespace { class VISIBILITY_HIDDEN LoopDeletion : public LoopPass { public: static char ID; // Pass ID, replacement for typeid - LoopDeletion() : LoopPass((intptr_t)&ID) { } + LoopDeletion() : LoopPass(&ID) {} // Possibly eliminate loop L if it is dead. bool runOnLoop(Loop* L, LPPassManager& LPM); diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp index 1ab9a18cf6f2..d8a1eb68aa36 100644 --- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -33,7 +33,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid - LoopIndexSplit() : LoopPass((intptr_t)&ID) {} + LoopIndexSplit() : LoopPass(&ID) {} // Index split Loop L. Return true if loop is split. bool runOnLoop(Loop *L, LPPassManager &LPM); diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp index f0dd40bd3396..488ab0eacff4 100644 --- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp +++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp @@ -48,7 +48,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid - LoopRotate() : LoopPass((intptr_t)&ID) {} + LoopRotate() : LoopPass(&ID) {} // Rotate Loop L as many times as possible. Return true if // loop is rotated at least once. diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 96fa0e9eb16c..6d8de40780a1 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -148,7 +148,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid explicit LoopStrengthReduce(const TargetLowering *tli = NULL) : - LoopPass((intptr_t)&ID), TLI(tli) { + LoopPass(&ID), TLI(tli) { } bool runOnLoop(Loop *L, LPPassManager &LPM); diff --git a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp index 386b91c252ca..ed4ea895cc26 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp @@ -42,7 +42,7 @@ namespace { class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { public: static char ID; // Pass ID, replacement for typeid - LoopUnroll() : LoopPass((intptr_t)&ID) {} + LoopUnroll() : LoopPass(&ID) {} /// A magic value for use with the Threshold parameter to indicate /// that the loop unroll should be performed regardless of how much diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 5473bac555bc..372e6e4f8342 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -87,7 +87,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid explicit LoopUnswitch(bool Os = false) : - LoopPass((intptr_t)&ID), OptimizeForSize(Os), redoLoop(false), + LoopPass(&ID), OptimizeForSize(Os), redoLoop(false), currentLoop(NULL), DF(NULL), DT(NULL), loopHeader(NULL), loopPreheader(NULL) {} diff --git a/llvm/lib/Transforms/Scalar/MarkModRef.cpp b/llvm/lib/Transforms/Scalar/MarkModRef.cpp index e20278aed3ee..5e83ee93103e 100644 --- a/llvm/lib/Transforms/Scalar/MarkModRef.cpp +++ b/llvm/lib/Transforms/Scalar/MarkModRef.cpp @@ -28,7 +28,7 @@ STATISTIC(NumReadOnly, "Number of functions marked readonly"); namespace { struct VISIBILITY_HIDDEN MarkModRef : public FunctionPass { static char ID; // Pass identification, replacement for typeid - MarkModRef() : FunctionPass((intptr_t)&ID) {} + MarkModRef() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 18f5f0c13065..8810edb53323 100644 --- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -300,7 +300,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - MemCpyOpt() : FunctionPass((intptr_t)&ID) { } + MemCpyOpt() : FunctionPass(&ID) {} private: // This transformation requires dominator postdominator info diff --git a/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp b/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp index 9a94fad93278..665a46bfd73f 100644 --- a/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -2249,7 +2249,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid - PredicateSimplifier() : FunctionPass((intptr_t)&ID) {} + PredicateSimplifier() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index dbb87c5e5b46..313723cfefa0 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -72,7 +72,7 @@ namespace { bool MadeChange; public: static char ID; // Pass identification, replacement for typeid - Reassociate() : FunctionPass((intptr_t)&ID) {} + Reassociate() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp index ce38b08ef97f..46b2952b4cc5 100644 --- a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp @@ -36,7 +36,7 @@ STATISTIC(NumPhisDemoted, "Number of phi-nodes demoted"); namespace { struct VISIBILITY_HIDDEN RegToMem : public FunctionPass { static char ID; // Pass identification, replacement for typeid - RegToMem() : FunctionPass((intptr_t)&ID) {} + RegToMem() : FunctionPass(&ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredID(BreakCriticalEdgesID); diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index ed0f727ecdfa..48842b2e3854 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1497,7 +1497,7 @@ namespace { /// struct VISIBILITY_HIDDEN SCCP : public FunctionPass { static char ID; // Pass identification, replacement for typeid - SCCP() : FunctionPass((intptr_t)&ID) {} + SCCP() : FunctionPass(&ID) {} // runOnFunction - Run the Sparse Conditional Constant Propagation // algorithm, and return true if the function was modified. @@ -1611,7 +1611,7 @@ namespace { /// struct VISIBILITY_HIDDEN IPSCCP : public ModulePass { static char ID; - IPSCCP() : ModulePass((intptr_t)&ID) {} + IPSCCP() : ModulePass(&ID) {} bool runOnModule(Module &M); }; } // end anonymous namespace diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index c5ca22145e3f..c29202826c24 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -48,7 +48,7 @@ STATISTIC(NumGlobals, "Number of allocas copied from constant global"); namespace { struct VISIBILITY_HIDDEN SROA : public FunctionPass { static char ID; // Pass identification, replacement for typeid - explicit SROA(signed T = -1) : FunctionPass((intptr_t)&ID) { + explicit SROA(signed T = -1) : FunctionPass(&ID) { if (T == -1) SRThreshold = 128; else diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp index 23683289c0b3..cd063079f689 100644 --- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -41,7 +41,7 @@ STATISTIC(NumSimpl, "Number of blocks simplified"); namespace { struct VISIBILITY_HIDDEN CFGSimplifyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid - CFGSimplifyPass() : FunctionPass((intptr_t)&ID) {} + CFGSimplifyPass() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); }; diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 8ef88553555e..965d1ce0dee4 100644 --- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp @@ -1206,7 +1206,7 @@ namespace { FWriteOpt FWrite; FPutsOpt FPuts; FPrintFOpt FPrintF; public: static char ID; // Pass identification - SimplifyLibCalls() : FunctionPass((intptr_t)&ID) {} + SimplifyLibCalls() : FunctionPass(&ID) {} void InitOptimizations(); bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Scalar/TailDuplication.cpp b/llvm/lib/Transforms/Scalar/TailDuplication.cpp index d0998ab5a65d..568ec06e39fb 100644 --- a/llvm/lib/Transforms/Scalar/TailDuplication.cpp +++ b/llvm/lib/Transforms/Scalar/TailDuplication.cpp @@ -48,7 +48,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - TailDup() : FunctionPass((intptr_t)&ID) {} + TailDup() : FunctionPass(&ID) {} private: inline bool shouldEliminateUnconditionalBranch(TerminatorInst *, unsigned); diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp index 6fcf55b581aa..e1234efb5788 100644 --- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -68,7 +68,7 @@ STATISTIC(NumAccumAdded, "Number of accumulators introduced"); namespace { struct VISIBILITY_HIDDEN TailCallElim : public FunctionPass { static char ID; // Pass identification, replacement for typeid - TailCallElim() : FunctionPass((intptr_t)&ID) {} + TailCallElim() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp index a821423d17f7..a32c01671282 100644 --- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -35,7 +35,7 @@ STATISTIC(NumBroken, "Number of blocks inserted"); namespace { struct VISIBILITY_HIDDEN BreakCriticalEdges : public FunctionPass { static char ID; // Pass identification, replacement for typeid - BreakCriticalEdges() : FunctionPass((intptr_t)&ID) {} + BreakCriticalEdges() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp index 55d7a485931e..bcba3c139906 100644 --- a/llvm/lib/Transforms/Utils/LCSSA.cpp +++ b/llvm/lib/Transforms/Utils/LCSSA.cpp @@ -49,7 +49,7 @@ STATISTIC(NumLCSSA, "Number of live out of a loop variables"); namespace { struct VISIBILITY_HIDDEN LCSSA : public LoopPass { static char ID; // Pass identification, replacement for typeid - LCSSA() : LoopPass((intptr_t)&ID) {} + LCSSA() : LoopPass(&ID) {} // Cached analysis information for the current function. LoopInfo *LI; diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp index 3267af74c3e1..af41036252b2 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp @@ -56,7 +56,7 @@ STATISTIC(NumNested , "Number of nested loops split out"); namespace { struct VISIBILITY_HIDDEN LoopSimplify : public FunctionPass { static char ID; // Pass identification, replacement for typeid - LoopSimplify() : FunctionPass((intptr_t)&ID) {} + LoopSimplify() : FunctionPass(&ID) {} // AA - If we have an alias analysis object to update, this is it, otherwise // this is null. diff --git a/llvm/lib/Transforms/Utils/LowerAllocations.cpp b/llvm/lib/Transforms/Utils/LowerAllocations.cpp index 4223c7f48139..792e98ea4285 100644 --- a/llvm/lib/Transforms/Utils/LowerAllocations.cpp +++ b/llvm/lib/Transforms/Utils/LowerAllocations.cpp @@ -38,7 +38,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid explicit LowerAllocations(bool LowerToInt = false) - : BasicBlockPass((intptr_t)&ID), MallocFunc(0), FreeFunc(0), + : BasicBlockPass(&ID), MallocFunc(0), FreeFunc(0), LowerMallocArgToInteger(LowerToInt) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp index 0f86765a70de..437fdbe04ddb 100644 --- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp +++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp @@ -78,7 +78,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit LowerInvoke(const TargetLowering *tli = NULL) - : FunctionPass((intptr_t)&ID), TLI(tli) { } + : FunctionPass(&ID), TLI(tli) { } bool doInitialization(Module &M); bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index 99e938416ec2..a7b1efc794f5 100644 --- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp @@ -33,7 +33,7 @@ namespace { class VISIBILITY_HIDDEN LowerSwitch : public FunctionPass { public: static char ID; // Pass identification, replacement for typeid - LowerSwitch() : FunctionPass((intptr_t) &ID) {} + LowerSwitch() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/llvm/lib/Transforms/Utils/Mem2Reg.cpp b/llvm/lib/Transforms/Utils/Mem2Reg.cpp index 1a936c04141a..2b06d778e145 100644 --- a/llvm/lib/Transforms/Utils/Mem2Reg.cpp +++ b/llvm/lib/Transforms/Utils/Mem2Reg.cpp @@ -28,7 +28,7 @@ STATISTIC(NumPromoted, "Number of alloca's promoted"); namespace { struct VISIBILITY_HIDDEN PromotePass : public FunctionPass { static char ID; // Pass identification, replacement for typeid - PromotePass() : FunctionPass((intptr_t)&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. diff --git a/llvm/lib/VMCore/PassManager.cpp b/llvm/lib/VMCore/PassManager.cpp index d7b3cc7e638b..42b33ff66b14 100644 --- a/llvm/lib/VMCore/PassManager.cpp +++ b/llvm/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/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 5ca8e1a23a2d..aa6963d94a23 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/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 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 ) {}